mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-39e1ab5971737357/out/
cubepilot.rs

1#![doc = "MAVLink cubepilot dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
23#[cfg_attr(feature = "ts", derive(TS))]
24#[cfg_attr(feature = "ts", ts(export))]
25#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
26#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27#[cfg_attr(feature = "serde", serde(tag = "type"))]
28#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29#[repr(u32)]
30#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
31pub enum ActuatorConfiguration {
32    #[doc = "Do nothing."]
33    ACTUATOR_CONFIGURATION_NONE = 0,
34    #[doc = "Command the actuator to beep now."]
35    ACTUATOR_CONFIGURATION_BEEP = 1,
36    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
37    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
38    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
40    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
41    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
44}
45impl ActuatorConfiguration {
46    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
47}
48impl Default for ActuatorConfiguration {
49    fn default() -> Self {
50        Self::DEFAULT
51    }
52}
53#[cfg_attr(feature = "ts", derive(TS))]
54#[cfg_attr(feature = "ts", ts(export))]
55#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
56#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
57#[cfg_attr(feature = "serde", serde(tag = "type"))]
58#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
59#[repr(u32)]
60#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
61pub enum ActuatorOutputFunction {
62    #[doc = "No function (disabled)."]
63    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
64    #[doc = "Motor 1"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
66    #[doc = "Motor 2"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
68    #[doc = "Motor 3"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
70    #[doc = "Motor 4"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
72    #[doc = "Motor 5"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
74    #[doc = "Motor 6"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
76    #[doc = "Motor 7"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
78    #[doc = "Motor 8"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
80    #[doc = "Motor 9"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
82    #[doc = "Motor 10"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
84    #[doc = "Motor 11"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
86    #[doc = "Motor 12"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
88    #[doc = "Motor 13"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
90    #[doc = "Motor 14"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
92    #[doc = "Motor 15"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
94    #[doc = "Motor 16"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
96    #[doc = "Servo 1"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
98    #[doc = "Servo 2"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
100    #[doc = "Servo 3"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
102    #[doc = "Servo 4"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
104    #[doc = "Servo 5"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
106    #[doc = "Servo 6"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
108    #[doc = "Servo 7"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
110    #[doc = "Servo 8"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
112    #[doc = "Servo 9"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
114    #[doc = "Servo 10"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
116    #[doc = "Servo 11"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
118    #[doc = "Servo 12"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
120    #[doc = "Servo 13"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
122    #[doc = "Servo 14"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
124    #[doc = "Servo 15"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
126    #[doc = "Servo 16"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
128}
129impl ActuatorOutputFunction {
130    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
131}
132impl Default for ActuatorOutputFunction {
133    fn default() -> Self {
134        Self::DEFAULT
135    }
136}
137#[cfg_attr(feature = "ts", derive(TS))]
138#[cfg_attr(feature = "ts", ts(export))]
139#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
141#[cfg_attr(feature = "serde", serde(tag = "type"))]
142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
143#[repr(u32)]
144#[doc = "Enumeration of the ADSB altimeter types"]
145pub enum AdsbAltitudeType {
146    #[doc = "Altitude reported from a Baro source using QNH reference"]
147    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
148    #[doc = "Altitude reported from a GNSS source"]
149    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
150}
151impl AdsbAltitudeType {
152    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
153}
154impl Default for AdsbAltitudeType {
155    fn default() -> Self {
156        Self::DEFAULT
157    }
158}
159#[cfg_attr(feature = "ts", derive(TS))]
160#[cfg_attr(feature = "ts", ts(export))]
161#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
163#[cfg_attr(feature = "serde", serde(tag = "type"))]
164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
165#[repr(u32)]
166#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
167pub enum AdsbEmitterType {
168    ADSB_EMITTER_TYPE_NO_INFO = 0,
169    ADSB_EMITTER_TYPE_LIGHT = 1,
170    ADSB_EMITTER_TYPE_SMALL = 2,
171    ADSB_EMITTER_TYPE_LARGE = 3,
172    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
173    ADSB_EMITTER_TYPE_HEAVY = 5,
174    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
175    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
176    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
177    ADSB_EMITTER_TYPE_GLIDER = 9,
178    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
179    ADSB_EMITTER_TYPE_PARACHUTE = 11,
180    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
181    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
182    ADSB_EMITTER_TYPE_UAV = 14,
183    ADSB_EMITTER_TYPE_SPACE = 15,
184    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
185    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
186    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
187    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
188}
189impl AdsbEmitterType {
190    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
191}
192impl Default for AdsbEmitterType {
193    fn default() -> Self {
194        Self::DEFAULT
195    }
196}
197bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
198impl AdsbFlags {
199    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
200}
201impl Default for AdsbFlags {
202    fn default() -> Self {
203        Self::DEFAULT
204    }
205}
206bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
207impl AisFlags {
208    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
209}
210impl Default for AisFlags {
211    fn default() -> Self {
212        Self::DEFAULT
213    }
214}
215#[cfg_attr(feature = "ts", derive(TS))]
216#[cfg_attr(feature = "ts", ts(export))]
217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
219#[cfg_attr(feature = "serde", serde(tag = "type"))]
220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
221#[repr(u32)]
222#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
223pub enum AisNavStatus {
224    #[doc = "Under way using engine."]
225    UNDER_WAY = 0,
226    AIS_NAV_ANCHORED = 1,
227    AIS_NAV_UN_COMMANDED = 2,
228    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
229    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
230    AIS_NAV_MOORED = 5,
231    AIS_NAV_AGROUND = 6,
232    AIS_NAV_FISHING = 7,
233    AIS_NAV_SAILING = 8,
234    AIS_NAV_RESERVED_HSC = 9,
235    AIS_NAV_RESERVED_WIG = 10,
236    AIS_NAV_RESERVED_1 = 11,
237    AIS_NAV_RESERVED_2 = 12,
238    AIS_NAV_RESERVED_3 = 13,
239    #[doc = "Search And Rescue Transponder."]
240    AIS_NAV_AIS_SART = 14,
241    #[doc = "Not available (default)."]
242    AIS_NAV_UNKNOWN = 15,
243}
244impl AisNavStatus {
245    pub const DEFAULT: Self = Self::UNDER_WAY;
246}
247impl Default for AisNavStatus {
248    fn default() -> Self {
249        Self::DEFAULT
250    }
251}
252#[cfg_attr(feature = "ts", derive(TS))]
253#[cfg_attr(feature = "ts", ts(export))]
254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
256#[cfg_attr(feature = "serde", serde(tag = "type"))]
257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
258#[repr(u32)]
259#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
260pub enum AisType {
261    #[doc = "Not available (default)."]
262    AIS_TYPE_UNKNOWN = 0,
263    AIS_TYPE_RESERVED_1 = 1,
264    AIS_TYPE_RESERVED_2 = 2,
265    AIS_TYPE_RESERVED_3 = 3,
266    AIS_TYPE_RESERVED_4 = 4,
267    AIS_TYPE_RESERVED_5 = 5,
268    AIS_TYPE_RESERVED_6 = 6,
269    AIS_TYPE_RESERVED_7 = 7,
270    AIS_TYPE_RESERVED_8 = 8,
271    AIS_TYPE_RESERVED_9 = 9,
272    AIS_TYPE_RESERVED_10 = 10,
273    AIS_TYPE_RESERVED_11 = 11,
274    AIS_TYPE_RESERVED_12 = 12,
275    AIS_TYPE_RESERVED_13 = 13,
276    AIS_TYPE_RESERVED_14 = 14,
277    AIS_TYPE_RESERVED_15 = 15,
278    AIS_TYPE_RESERVED_16 = 16,
279    AIS_TYPE_RESERVED_17 = 17,
280    AIS_TYPE_RESERVED_18 = 18,
281    AIS_TYPE_RESERVED_19 = 19,
282    #[doc = "Wing In Ground effect."]
283    AIS_TYPE_WIG = 20,
284    AIS_TYPE_WIG_HAZARDOUS_A = 21,
285    AIS_TYPE_WIG_HAZARDOUS_B = 22,
286    AIS_TYPE_WIG_HAZARDOUS_C = 23,
287    AIS_TYPE_WIG_HAZARDOUS_D = 24,
288    AIS_TYPE_WIG_RESERVED_1 = 25,
289    AIS_TYPE_WIG_RESERVED_2 = 26,
290    AIS_TYPE_WIG_RESERVED_3 = 27,
291    AIS_TYPE_WIG_RESERVED_4 = 28,
292    AIS_TYPE_WIG_RESERVED_5 = 29,
293    AIS_TYPE_FISHING = 30,
294    AIS_TYPE_TOWING = 31,
295    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
296    AIS_TYPE_TOWING_LARGE = 32,
297    #[doc = "Dredging or other underwater ops."]
298    AIS_TYPE_DREDGING = 33,
299    AIS_TYPE_DIVING = 34,
300    AIS_TYPE_MILITARY = 35,
301    AIS_TYPE_SAILING = 36,
302    AIS_TYPE_PLEASURE = 37,
303    AIS_TYPE_RESERVED_20 = 38,
304    AIS_TYPE_RESERVED_21 = 39,
305    #[doc = "High Speed Craft."]
306    AIS_TYPE_HSC = 40,
307    AIS_TYPE_HSC_HAZARDOUS_A = 41,
308    AIS_TYPE_HSC_HAZARDOUS_B = 42,
309    AIS_TYPE_HSC_HAZARDOUS_C = 43,
310    AIS_TYPE_HSC_HAZARDOUS_D = 44,
311    AIS_TYPE_HSC_RESERVED_1 = 45,
312    AIS_TYPE_HSC_RESERVED_2 = 46,
313    AIS_TYPE_HSC_RESERVED_3 = 47,
314    AIS_TYPE_HSC_RESERVED_4 = 48,
315    AIS_TYPE_HSC_UNKNOWN = 49,
316    AIS_TYPE_PILOT = 50,
317    #[doc = "Search And Rescue vessel."]
318    AIS_TYPE_SAR = 51,
319    AIS_TYPE_TUG = 52,
320    AIS_TYPE_PORT_TENDER = 53,
321    #[doc = "Anti-pollution equipment."]
322    AIS_TYPE_ANTI_POLLUTION = 54,
323    AIS_TYPE_LAW_ENFORCEMENT = 55,
324    AIS_TYPE_SPARE_LOCAL_1 = 56,
325    AIS_TYPE_SPARE_LOCAL_2 = 57,
326    AIS_TYPE_MEDICAL_TRANSPORT = 58,
327    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
328    AIS_TYPE_NONECOMBATANT = 59,
329    AIS_TYPE_PASSENGER = 60,
330    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
331    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
332    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
333    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
334    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
335    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
336    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
337    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
338    AIS_TYPE_PASSENGER_UNKNOWN = 69,
339    AIS_TYPE_CARGO = 70,
340    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
341    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
342    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
343    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
344    AIS_TYPE_CARGO_RESERVED_1 = 75,
345    AIS_TYPE_CARGO_RESERVED_2 = 76,
346    AIS_TYPE_CARGO_RESERVED_3 = 77,
347    AIS_TYPE_CARGO_RESERVED_4 = 78,
348    AIS_TYPE_CARGO_UNKNOWN = 79,
349    AIS_TYPE_TANKER = 80,
350    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
351    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
352    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
353    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
354    AIS_TYPE_TANKER_RESERVED_1 = 85,
355    AIS_TYPE_TANKER_RESERVED_2 = 86,
356    AIS_TYPE_TANKER_RESERVED_3 = 87,
357    AIS_TYPE_TANKER_RESERVED_4 = 88,
358    AIS_TYPE_TANKER_UNKNOWN = 89,
359    AIS_TYPE_OTHER = 90,
360    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
361    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
362    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
363    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
364    AIS_TYPE_OTHER_RESERVED_1 = 95,
365    AIS_TYPE_OTHER_RESERVED_2 = 96,
366    AIS_TYPE_OTHER_RESERVED_3 = 97,
367    AIS_TYPE_OTHER_RESERVED_4 = 98,
368    AIS_TYPE_OTHER_UNKNOWN = 99,
369}
370impl AisType {
371    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
372}
373impl Default for AisType {
374    fn default() -> Self {
375        Self::DEFAULT
376    }
377}
378bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
379impl AttitudeTargetTypemask {
380    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
381}
382impl Default for AttitudeTargetTypemask {
383    fn default() -> Self {
384        Self::DEFAULT
385    }
386}
387#[cfg_attr(feature = "ts", derive(TS))]
388#[cfg_attr(feature = "ts", ts(export))]
389#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
391#[cfg_attr(feature = "serde", serde(tag = "type"))]
392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
393#[repr(u32)]
394#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
395pub enum AutotuneAxis {
396    #[doc = "Autotune roll axis."]
397    AUTOTUNE_AXIS_ROLL = 1,
398    #[doc = "Autotune pitch axis."]
399    AUTOTUNE_AXIS_PITCH = 2,
400    #[doc = "Autotune yaw axis."]
401    AUTOTUNE_AXIS_YAW = 4,
402}
403impl AutotuneAxis {
404    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
405}
406impl Default for AutotuneAxis {
407    fn default() -> Self {
408        Self::DEFAULT
409    }
410}
411bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
412impl CameraCapFlags {
413    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
414}
415impl Default for CameraCapFlags {
416    fn default() -> Self {
417        Self::DEFAULT
418    }
419}
420#[cfg_attr(feature = "ts", derive(TS))]
421#[cfg_attr(feature = "ts", ts(export))]
422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
424#[cfg_attr(feature = "serde", serde(tag = "type"))]
425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
426#[repr(u32)]
427#[doc = "Camera Modes."]
428pub enum CameraMode {
429    #[doc = "Camera is in image/photo capture mode."]
430    CAMERA_MODE_IMAGE = 0,
431    #[doc = "Camera is in video capture mode."]
432    CAMERA_MODE_VIDEO = 1,
433    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
434    CAMERA_MODE_IMAGE_SURVEY = 2,
435}
436impl CameraMode {
437    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
438}
439impl Default for CameraMode {
440    fn default() -> Self {
441        Self::DEFAULT
442    }
443}
444#[cfg_attr(feature = "ts", derive(TS))]
445#[cfg_attr(feature = "ts", ts(export))]
446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
448#[cfg_attr(feature = "serde", serde(tag = "type"))]
449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
450#[repr(u32)]
451#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
452pub enum CameraSource {
453    #[doc = "Default camera source."]
454    CAMERA_SOURCE_DEFAULT = 0,
455    #[doc = "RGB camera source."]
456    CAMERA_SOURCE_RGB = 1,
457    #[doc = "IR camera source."]
458    CAMERA_SOURCE_IR = 2,
459    #[doc = "NDVI camera source."]
460    CAMERA_SOURCE_NDVI = 3,
461}
462impl CameraSource {
463    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
464}
465impl Default for CameraSource {
466    fn default() -> Self {
467        Self::DEFAULT
468    }
469}
470#[cfg_attr(feature = "ts", derive(TS))]
471#[cfg_attr(feature = "ts", ts(export))]
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking modes"]
478pub enum CameraTrackingMode {
479    #[doc = "Not tracking"]
480    CAMERA_TRACKING_MODE_NONE = 0,
481    #[doc = "Target is a point"]
482    CAMERA_TRACKING_MODE_POINT = 1,
483    #[doc = "Target is a rectangle"]
484    CAMERA_TRACKING_MODE_RECTANGLE = 2,
485}
486impl CameraTrackingMode {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
488}
489impl Default for CameraTrackingMode {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494#[cfg_attr(feature = "ts", derive(TS))]
495#[cfg_attr(feature = "ts", ts(export))]
496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
498#[cfg_attr(feature = "serde", serde(tag = "type"))]
499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
500#[repr(u32)]
501#[doc = "Camera tracking status flags"]
502pub enum CameraTrackingStatusFlags {
503    #[doc = "Camera is not tracking"]
504    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
505    #[doc = "Camera is tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
507    #[doc = "Camera tracking in error state"]
508    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
509}
510impl CameraTrackingStatusFlags {
511    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
512}
513impl Default for CameraTrackingStatusFlags {
514    fn default() -> Self {
515        Self::DEFAULT
516    }
517}
518bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
519impl CameraTrackingTargetData {
520    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
521}
522impl Default for CameraTrackingTargetData {
523    fn default() -> Self {
524        Self::DEFAULT
525    }
526}
527#[cfg_attr(feature = "ts", derive(TS))]
528#[cfg_attr(feature = "ts", ts(export))]
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
535pub enum CameraZoomType {
536    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
537    ZOOM_TYPE_STEP = 0,
538    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
539    ZOOM_TYPE_CONTINUOUS = 1,
540    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
541    ZOOM_TYPE_RANGE = 2,
542    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
543    ZOOM_TYPE_FOCAL_LENGTH = 3,
544    #[doc = "Zoom value as horizontal field of view in degrees."]
545    ZOOM_TYPE_HORIZONTAL_FOV = 4,
546}
547impl CameraZoomType {
548    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
549}
550impl Default for CameraZoomType {
551    fn default() -> Self {
552        Self::DEFAULT
553    }
554}
555#[cfg_attr(feature = "ts", derive(TS))]
556#[cfg_attr(feature = "ts", ts(export))]
557#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
559#[cfg_attr(feature = "serde", serde(tag = "type"))]
560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
561#[repr(u32)]
562pub enum CanFilterOp {
563    CAN_FILTER_REPLACE = 0,
564    CAN_FILTER_ADD = 1,
565    CAN_FILTER_REMOVE = 2,
566}
567impl CanFilterOp {
568    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
569}
570impl Default for CanFilterOp {
571    fn default() -> Self {
572        Self::DEFAULT
573    }
574}
575#[cfg_attr(feature = "ts", derive(TS))]
576#[cfg_attr(feature = "ts", ts(export))]
577#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
579#[cfg_attr(feature = "serde", serde(tag = "type"))]
580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
581#[repr(u32)]
582#[doc = "Possible responses from a CELLULAR_CONFIG message."]
583pub enum CellularConfigResponse {
584    #[doc = "Changes accepted."]
585    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
586    #[doc = "Invalid APN."]
587    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
588    #[doc = "Invalid PIN."]
589    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
590    #[doc = "Changes rejected."]
591    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
592    #[doc = "PUK is required to unblock SIM card."]
593    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
594}
595impl CellularConfigResponse {
596    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
597}
598impl Default for CellularConfigResponse {
599    fn default() -> Self {
600        Self::DEFAULT
601    }
602}
603#[cfg_attr(feature = "ts", derive(TS))]
604#[cfg_attr(feature = "ts", ts(export))]
605#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
607#[cfg_attr(feature = "serde", serde(tag = "type"))]
608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
609#[repr(u32)]
610#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
611pub enum CellularNetworkFailedReason {
612    #[doc = "No error"]
613    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
614    #[doc = "Error state is unknown"]
615    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
616    #[doc = "SIM is required for the modem but missing"]
617    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
618    #[doc = "SIM is available, but not usable for connection"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
620}
621impl CellularNetworkFailedReason {
622    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
623}
624impl Default for CellularNetworkFailedReason {
625    fn default() -> Self {
626        Self::DEFAULT
627    }
628}
629#[cfg_attr(feature = "ts", derive(TS))]
630#[cfg_attr(feature = "ts", ts(export))]
631#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
633#[cfg_attr(feature = "serde", serde(tag = "type"))]
634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
635#[repr(u32)]
636#[doc = "Cellular network radio type"]
637pub enum CellularNetworkRadioType {
638    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
639    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
640    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
641    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
642    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
643}
644impl CellularNetworkRadioType {
645    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
646}
647impl Default for CellularNetworkRadioType {
648    fn default() -> Self {
649        Self::DEFAULT
650    }
651}
652#[cfg_attr(feature = "ts", derive(TS))]
653#[cfg_attr(feature = "ts", ts(export))]
654#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
656#[cfg_attr(feature = "serde", serde(tag = "type"))]
657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
658#[repr(u32)]
659#[doc = "These flags encode the cellular network status"]
660pub enum CellularStatusFlag {
661    #[doc = "State unknown or not reportable."]
662    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
663    #[doc = "Modem is unusable"]
664    CELLULAR_STATUS_FLAG_FAILED = 1,
665    #[doc = "Modem is being initialized"]
666    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
667    #[doc = "Modem is locked"]
668    CELLULAR_STATUS_FLAG_LOCKED = 3,
669    #[doc = "Modem is not enabled and is powered down"]
670    CELLULAR_STATUS_FLAG_DISABLED = 4,
671    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
672    CELLULAR_STATUS_FLAG_DISABLING = 5,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
674    CELLULAR_STATUS_FLAG_ENABLING = 6,
675    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
676    CELLULAR_STATUS_FLAG_ENABLED = 7,
677    #[doc = "Modem is searching for a network provider to register"]
678    CELLULAR_STATUS_FLAG_SEARCHING = 8,
679    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
680    CELLULAR_STATUS_FLAG_REGISTERED = 9,
681    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
682    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
683    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
684    CELLULAR_STATUS_FLAG_CONNECTING = 11,
685    #[doc = "One or more packet data bearers is active and connected"]
686    CELLULAR_STATUS_FLAG_CONNECTED = 12,
687}
688impl CellularStatusFlag {
689    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
690}
691impl Default for CellularStatusFlag {
692    fn default() -> Self {
693        Self::DEFAULT
694    }
695}
696#[cfg_attr(feature = "ts", derive(TS))]
697#[cfg_attr(feature = "ts", ts(export))]
698#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
700#[cfg_attr(feature = "serde", serde(tag = "type"))]
701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
702#[repr(u32)]
703#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
704pub enum CompMetadataType {
705    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
706    COMP_METADATA_TYPE_GENERAL = 0,
707    #[doc = "Parameter meta data."]
708    COMP_METADATA_TYPE_PARAMETER = 1,
709    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
710    COMP_METADATA_TYPE_COMMANDS = 2,
711    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
712    COMP_METADATA_TYPE_PERIPHERALS = 3,
713    #[doc = "Meta data for the events interface."]
714    COMP_METADATA_TYPE_EVENTS = 4,
715    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
716    COMP_METADATA_TYPE_ACTUATORS = 5,
717}
718impl CompMetadataType {
719    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
720}
721impl Default for CompMetadataType {
722    fn default() -> Self {
723        Self::DEFAULT
724    }
725}
726#[cfg_attr(feature = "ts", derive(TS))]
727#[cfg_attr(feature = "ts", ts(export))]
728#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
730#[cfg_attr(feature = "serde", serde(tag = "type"))]
731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
732#[repr(u32)]
733#[doc = "Indicates the ESC connection type."]
734pub enum EscConnectionType {
735    #[doc = "Traditional PPM ESC."]
736    ESC_CONNECTION_TYPE_PPM = 0,
737    #[doc = "Serial Bus connected ESC."]
738    ESC_CONNECTION_TYPE_SERIAL = 1,
739    #[doc = "One Shot PPM ESC."]
740    ESC_CONNECTION_TYPE_ONESHOT = 2,
741    #[doc = "I2C ESC."]
742    ESC_CONNECTION_TYPE_I2C = 3,
743    #[doc = "CAN-Bus ESC."]
744    ESC_CONNECTION_TYPE_CAN = 4,
745    #[doc = "DShot ESC."]
746    ESC_CONNECTION_TYPE_DSHOT = 5,
747}
748impl EscConnectionType {
749    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
750}
751impl Default for EscConnectionType {
752    fn default() -> Self {
753        Self::DEFAULT
754    }
755}
756bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
757impl EscFailureFlags {
758    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
759}
760impl Default for EscFailureFlags {
761    fn default() -> Self {
762        Self::DEFAULT
763    }
764}
765bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
766impl EstimatorStatusFlags {
767    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
768}
769impl Default for EstimatorStatusFlags {
770    fn default() -> Self {
771        Self::DEFAULT
772    }
773}
774#[cfg_attr(feature = "ts", derive(TS))]
775#[cfg_attr(feature = "ts", ts(export))]
776#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
778#[cfg_attr(feature = "serde", serde(tag = "type"))]
779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
780#[repr(u32)]
781#[doc = "List of possible failure type to inject."]
782pub enum FailureType {
783    #[doc = "No failure injected, used to reset a previous failure."]
784    FAILURE_TYPE_OK = 0,
785    #[doc = "Sets unit off, so completely non-responsive."]
786    FAILURE_TYPE_OFF = 1,
787    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
788    FAILURE_TYPE_STUCK = 2,
789    #[doc = "Unit is reporting complete garbage."]
790    FAILURE_TYPE_GARBAGE = 3,
791    #[doc = "Unit is consistently wrong."]
792    FAILURE_TYPE_WRONG = 4,
793    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
794    FAILURE_TYPE_SLOW = 5,
795    #[doc = "Data of unit is delayed in time."]
796    FAILURE_TYPE_DELAYED = 6,
797    #[doc = "Unit is sometimes working, sometimes not."]
798    FAILURE_TYPE_INTERMITTENT = 7,
799}
800impl FailureType {
801    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
802}
803impl Default for FailureType {
804    fn default() -> Self {
805        Self::DEFAULT
806    }
807}
808#[cfg_attr(feature = "ts", derive(TS))]
809#[cfg_attr(feature = "ts", ts(export))]
810#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
812#[cfg_attr(feature = "serde", serde(tag = "type"))]
813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
814#[repr(u32)]
815#[doc = "List of possible units where failures can be injected."]
816pub enum FailureUnit {
817    FAILURE_UNIT_SENSOR_GYRO = 0,
818    FAILURE_UNIT_SENSOR_ACCEL = 1,
819    FAILURE_UNIT_SENSOR_MAG = 2,
820    FAILURE_UNIT_SENSOR_BARO = 3,
821    FAILURE_UNIT_SENSOR_GPS = 4,
822    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
823    FAILURE_UNIT_SENSOR_VIO = 6,
824    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
825    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
826    FAILURE_UNIT_SYSTEM_BATTERY = 100,
827    FAILURE_UNIT_SYSTEM_MOTOR = 101,
828    FAILURE_UNIT_SYSTEM_SERVO = 102,
829    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
830    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
831    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
832}
833impl FailureUnit {
834    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
835}
836impl Default for FailureUnit {
837    fn default() -> Self {
838        Self::DEFAULT
839    }
840}
841#[cfg_attr(feature = "ts", derive(TS))]
842#[cfg_attr(feature = "ts", ts(export))]
843#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
845#[cfg_attr(feature = "serde", serde(tag = "type"))]
846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
847#[repr(u32)]
848pub enum FenceBreach {
849    #[doc = "No last fence breach"]
850    FENCE_BREACH_NONE = 0,
851    #[doc = "Breached minimum altitude"]
852    FENCE_BREACH_MINALT = 1,
853    #[doc = "Breached maximum altitude"]
854    FENCE_BREACH_MAXALT = 2,
855    #[doc = "Breached fence boundary"]
856    FENCE_BREACH_BOUNDARY = 3,
857}
858impl FenceBreach {
859    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
860}
861impl Default for FenceBreach {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[cfg_attr(feature = "ts", derive(TS))]
867#[cfg_attr(feature = "ts", ts(export))]
868#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
870#[cfg_attr(feature = "serde", serde(tag = "type"))]
871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
872#[repr(u32)]
873#[doc = "Actions being taken to mitigate/prevent fence breach"]
874pub enum FenceMitigate {
875    #[doc = "Unknown"]
876    FENCE_MITIGATE_UNKNOWN = 0,
877    #[doc = "No actions being taken"]
878    FENCE_MITIGATE_NONE = 1,
879    #[doc = "Velocity limiting active to prevent breach"]
880    FENCE_MITIGATE_VEL_LIMIT = 2,
881}
882impl FenceMitigate {
883    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
884}
885impl Default for FenceMitigate {
886    fn default() -> Self {
887        Self::DEFAULT
888    }
889}
890#[cfg_attr(feature = "ts", derive(TS))]
891#[cfg_attr(feature = "ts", ts(export))]
892#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
894#[cfg_attr(feature = "serde", serde(tag = "type"))]
895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
896#[repr(u32)]
897#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
898pub enum FenceType {
899    #[doc = "Maximum altitude fence"]
900    FENCE_TYPE_ALT_MAX = 1,
901    #[doc = "Circle fence"]
902    FENCE_TYPE_CIRCLE = 2,
903    #[doc = "Polygon fence"]
904    FENCE_TYPE_POLYGON = 4,
905    #[doc = "Minimum altitude fence"]
906    FENCE_TYPE_ALT_MIN = 8,
907}
908impl FenceType {
909    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
910}
911impl Default for FenceType {
912    fn default() -> Self {
913        Self::DEFAULT
914    }
915}
916#[cfg_attr(feature = "ts", derive(TS))]
917#[cfg_attr(feature = "ts", ts(export))]
918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
920#[cfg_attr(feature = "serde", serde(tag = "type"))]
921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
922#[repr(u32)]
923#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
924pub enum FirmwareVersionType {
925    #[doc = "development release"]
926    FIRMWARE_VERSION_TYPE_DEV = 0,
927    #[doc = "alpha release"]
928    FIRMWARE_VERSION_TYPE_ALPHA = 64,
929    #[doc = "beta release"]
930    FIRMWARE_VERSION_TYPE_BETA = 128,
931    #[doc = "release candidate"]
932    FIRMWARE_VERSION_TYPE_RC = 192,
933    #[doc = "official stable release"]
934    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
935}
936impl FirmwareVersionType {
937    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
938}
939impl Default for FirmwareVersionType {
940    fn default() -> Self {
941        Self::DEFAULT
942    }
943}
944bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
945impl GimbalDeviceCapFlags {
946    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
947}
948impl Default for GimbalDeviceCapFlags {
949    fn default() -> Self {
950        Self::DEFAULT
951    }
952}
953bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
954impl GimbalDeviceErrorFlags {
955    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
956}
957impl Default for GimbalDeviceErrorFlags {
958    fn default() -> Self {
959        Self::DEFAULT
960    }
961}
962bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
963impl GimbalDeviceFlags {
964    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
965}
966impl Default for GimbalDeviceFlags {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
972impl GimbalManagerCapFlags {
973    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
974}
975impl Default for GimbalManagerCapFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
981impl GimbalManagerFlags {
982    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
983}
984impl Default for GimbalManagerFlags {
985    fn default() -> Self {
986        Self::DEFAULT
987    }
988}
989#[cfg_attr(feature = "ts", derive(TS))]
990#[cfg_attr(feature = "ts", ts(export))]
991#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
993#[cfg_attr(feature = "serde", serde(tag = "type"))]
994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
995#[repr(u32)]
996#[doc = "Type of GPS fix"]
997pub enum GpsFixType {
998    #[doc = "No GPS connected"]
999    GPS_FIX_TYPE_NO_GPS = 0,
1000    #[doc = "No position information, GPS is connected"]
1001    GPS_FIX_TYPE_NO_FIX = 1,
1002    #[doc = "2D position"]
1003    GPS_FIX_TYPE_2D_FIX = 2,
1004    #[doc = "3D position"]
1005    GPS_FIX_TYPE_3D_FIX = 3,
1006    #[doc = "DGPS/SBAS aided 3D position"]
1007    GPS_FIX_TYPE_DGPS = 4,
1008    #[doc = "RTK float, 3D position"]
1009    GPS_FIX_TYPE_RTK_FLOAT = 5,
1010    #[doc = "RTK Fixed, 3D position"]
1011    GPS_FIX_TYPE_RTK_FIXED = 6,
1012    #[doc = "Static fixed, typically used for base stations"]
1013    GPS_FIX_TYPE_STATIC = 7,
1014    #[doc = "PPP, 3D position."]
1015    GPS_FIX_TYPE_PPP = 8,
1016}
1017impl GpsFixType {
1018    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1019}
1020impl Default for GpsFixType {
1021    fn default() -> Self {
1022        Self::DEFAULT
1023    }
1024}
1025bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1026impl GpsInputIgnoreFlags {
1027    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1028}
1029impl Default for GpsInputIgnoreFlags {
1030    fn default() -> Self {
1031        Self::DEFAULT
1032    }
1033}
1034#[cfg_attr(feature = "ts", derive(TS))]
1035#[cfg_attr(feature = "ts", ts(export))]
1036#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1038#[cfg_attr(feature = "serde", serde(tag = "type"))]
1039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1040#[repr(u32)]
1041#[doc = "Gripper actions."]
1042pub enum GripperActions {
1043    #[doc = "Gripper release cargo."]
1044    GRIPPER_ACTION_RELEASE = 0,
1045    #[doc = "Gripper grab onto cargo."]
1046    GRIPPER_ACTION_GRAB = 1,
1047}
1048impl GripperActions {
1049    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1050}
1051impl Default for GripperActions {
1052    fn default() -> Self {
1053        Self::DEFAULT
1054    }
1055}
1056bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1057impl HighresImuUpdatedFlags {
1058    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1059}
1060impl Default for HighresImuUpdatedFlags {
1061    fn default() -> Self {
1062        Self::DEFAULT
1063    }
1064}
1065bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1066impl HilActuatorControlsFlags {
1067    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1068}
1069impl Default for HilActuatorControlsFlags {
1070    fn default() -> Self {
1071        Self::DEFAULT
1072    }
1073}
1074bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1075impl HilSensorUpdatedFlags {
1076    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1077}
1078impl Default for HilSensorUpdatedFlags {
1079    fn default() -> Self {
1080        Self::DEFAULT
1081    }
1082}
1083bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1084impl HlFailureFlag {
1085    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1086}
1087impl Default for HlFailureFlag {
1088    fn default() -> Self {
1089        Self::DEFAULT
1090    }
1091}
1092bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1093impl IlluminatorErrorFlags {
1094    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1095}
1096impl Default for IlluminatorErrorFlags {
1097    fn default() -> Self {
1098        Self::DEFAULT
1099    }
1100}
1101#[cfg_attr(feature = "ts", derive(TS))]
1102#[cfg_attr(feature = "ts", ts(export))]
1103#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1105#[cfg_attr(feature = "serde", serde(tag = "type"))]
1106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1107#[repr(u32)]
1108#[doc = "Modes of illuminator"]
1109pub enum IlluminatorMode {
1110    #[doc = "Illuminator mode is not specified/unknown"]
1111    ILLUMINATOR_MODE_UNKNOWN = 0,
1112    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1113    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1114    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1115    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1116}
1117impl IlluminatorMode {
1118    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1119}
1120impl Default for IlluminatorMode {
1121    fn default() -> Self {
1122        Self::DEFAULT
1123    }
1124}
1125#[cfg_attr(feature = "ts", derive(TS))]
1126#[cfg_attr(feature = "ts", ts(export))]
1127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1129#[cfg_attr(feature = "serde", serde(tag = "type"))]
1130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1131#[repr(u32)]
1132#[doc = "Type of landing target"]
1133pub enum LandingTargetType {
1134    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1135    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1136    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1137    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1138    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1139    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1140    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1141    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1142}
1143impl LandingTargetType {
1144    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1145}
1146impl Default for LandingTargetType {
1147    fn default() -> Self {
1148        Self::DEFAULT
1149    }
1150}
1151#[cfg_attr(feature = "ts", derive(TS))]
1152#[cfg_attr(feature = "ts", ts(export))]
1153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1155#[cfg_attr(feature = "serde", serde(tag = "type"))]
1156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1157#[repr(u32)]
1158pub enum MagCalStatus {
1159    MAG_CAL_NOT_STARTED = 0,
1160    MAG_CAL_WAITING_TO_START = 1,
1161    MAG_CAL_RUNNING_STEP_ONE = 2,
1162    MAG_CAL_RUNNING_STEP_TWO = 3,
1163    MAG_CAL_SUCCESS = 4,
1164    MAG_CAL_FAILED = 5,
1165    MAG_CAL_BAD_ORIENTATION = 6,
1166    MAG_CAL_BAD_RADIUS = 7,
1167}
1168impl MagCalStatus {
1169    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1170}
1171impl Default for MagCalStatus {
1172    fn default() -> Self {
1173        Self::DEFAULT
1174    }
1175}
1176#[cfg_attr(feature = "ts", derive(TS))]
1177#[cfg_attr(feature = "ts", ts(export))]
1178#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1180#[cfg_attr(feature = "serde", serde(tag = "type"))]
1181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1182#[repr(u32)]
1183pub enum MavArmAuthDeniedReason {
1184    #[doc = "Not a specific reason"]
1185    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1186    #[doc = "Authorizer will send the error as string to GCS"]
1187    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1188    #[doc = "At least one waypoint have a invalid value"]
1189    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1190    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1191    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1192    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1193    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1194    #[doc = "Weather is not good to fly"]
1195    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1196}
1197impl MavArmAuthDeniedReason {
1198    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1199}
1200impl Default for MavArmAuthDeniedReason {
1201    fn default() -> Self {
1202        Self::DEFAULT
1203    }
1204}
1205#[cfg_attr(feature = "ts", derive(TS))]
1206#[cfg_attr(feature = "ts", ts(export))]
1207#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1209#[cfg_attr(feature = "serde", serde(tag = "type"))]
1210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1211#[repr(u32)]
1212#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1213pub enum MavAutopilot {
1214    #[doc = "Generic autopilot, full support for everything"]
1215    MAV_AUTOPILOT_GENERIC = 0,
1216    #[doc = "Reserved for future use."]
1217    MAV_AUTOPILOT_RESERVED = 1,
1218    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1219    MAV_AUTOPILOT_SLUGS = 2,
1220    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1221    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1222    #[doc = "OpenPilot, <http://openpilot.org>"]
1223    MAV_AUTOPILOT_OPENPILOT = 4,
1224    #[doc = "Generic autopilot only supporting simple waypoints"]
1225    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1226    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1227    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1228    #[doc = "Generic autopilot supporting the full mission command set"]
1229    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1230    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1231    MAV_AUTOPILOT_INVALID = 8,
1232    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1233    MAV_AUTOPILOT_PPZ = 9,
1234    #[doc = "UAV Dev Board"]
1235    MAV_AUTOPILOT_UDB = 10,
1236    #[doc = "FlexiPilot"]
1237    MAV_AUTOPILOT_FP = 11,
1238    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1239    MAV_AUTOPILOT_PX4 = 12,
1240    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1241    MAV_AUTOPILOT_SMACCMPILOT = 13,
1242    #[doc = "AutoQuad -- <http://autoquad.org>"]
1243    MAV_AUTOPILOT_AUTOQUAD = 14,
1244    #[doc = "Armazila -- <http://armazila.com>"]
1245    MAV_AUTOPILOT_ARMAZILA = 15,
1246    #[doc = "Aerob -- <http://aerob.ru>"]
1247    MAV_AUTOPILOT_AEROB = 16,
1248    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1249    MAV_AUTOPILOT_ASLUAV = 17,
1250    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1251    MAV_AUTOPILOT_SMARTAP = 18,
1252    #[doc = "AirRails - <http://uaventure.com>"]
1253    MAV_AUTOPILOT_AIRRAILS = 19,
1254    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1255    MAV_AUTOPILOT_REFLEX = 20,
1256}
1257impl MavAutopilot {
1258    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1259}
1260impl Default for MavAutopilot {
1261    fn default() -> Self {
1262        Self::DEFAULT
1263    }
1264}
1265#[cfg_attr(feature = "ts", derive(TS))]
1266#[cfg_attr(feature = "ts", ts(export))]
1267#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1269#[cfg_attr(feature = "serde", serde(tag = "type"))]
1270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1271#[repr(u32)]
1272#[doc = "Enumeration for battery charge states."]
1273pub enum MavBatteryChargeState {
1274    #[doc = "Low battery state is not provided"]
1275    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1276    #[doc = "Battery is not in low state. Normal operation."]
1277    MAV_BATTERY_CHARGE_STATE_OK = 1,
1278    #[doc = "Battery state is low, warn and monitor close."]
1279    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1280    #[doc = "Battery state is critical, return or abort immediately."]
1281    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1282    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1283    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1284    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1285    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1286    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1287    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1288    #[doc = "Battery is charging."]
1289    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1290}
1291impl MavBatteryChargeState {
1292    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1293}
1294impl Default for MavBatteryChargeState {
1295    fn default() -> Self {
1296        Self::DEFAULT
1297    }
1298}
1299bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1300impl MavBatteryFault {
1301    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1302}
1303impl Default for MavBatteryFault {
1304    fn default() -> Self {
1305        Self::DEFAULT
1306    }
1307}
1308#[cfg_attr(feature = "ts", derive(TS))]
1309#[cfg_attr(feature = "ts", ts(export))]
1310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1312#[cfg_attr(feature = "serde", serde(tag = "type"))]
1313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1314#[repr(u32)]
1315#[doc = "Enumeration of battery functions"]
1316pub enum MavBatteryFunction {
1317    #[doc = "Battery function is unknown"]
1318    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1319    #[doc = "Battery supports all flight systems"]
1320    MAV_BATTERY_FUNCTION_ALL = 1,
1321    #[doc = "Battery for the propulsion system"]
1322    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1323    #[doc = "Avionics battery"]
1324    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1325    #[doc = "Payload battery"]
1326    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1327}
1328impl MavBatteryFunction {
1329    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1330}
1331impl Default for MavBatteryFunction {
1332    fn default() -> Self {
1333        Self::DEFAULT
1334    }
1335}
1336#[cfg_attr(feature = "ts", derive(TS))]
1337#[cfg_attr(feature = "ts", ts(export))]
1338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1340#[cfg_attr(feature = "serde", serde(tag = "type"))]
1341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1342#[repr(u32)]
1343#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1344pub enum MavBatteryMode {
1345    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1346    MAV_BATTERY_MODE_UNKNOWN = 0,
1347    #[doc = "Battery is auto discharging (towards storage level)."]
1348    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1349    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1350    MAV_BATTERY_MODE_HOT_SWAP = 2,
1351}
1352impl MavBatteryMode {
1353    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1354}
1355impl Default for MavBatteryMode {
1356    fn default() -> Self {
1357        Self::DEFAULT
1358    }
1359}
1360#[cfg_attr(feature = "ts", derive(TS))]
1361#[cfg_attr(feature = "ts", ts(export))]
1362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1364#[cfg_attr(feature = "serde", serde(tag = "type"))]
1365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1366#[repr(u32)]
1367#[doc = "Enumeration of battery types"]
1368pub enum MavBatteryType {
1369    #[doc = "Not specified."]
1370    MAV_BATTERY_TYPE_UNKNOWN = 0,
1371    #[doc = "Lithium polymer battery"]
1372    MAV_BATTERY_TYPE_LIPO = 1,
1373    #[doc = "Lithium-iron-phosphate battery"]
1374    MAV_BATTERY_TYPE_LIFE = 2,
1375    #[doc = "Lithium-ION battery"]
1376    MAV_BATTERY_TYPE_LION = 3,
1377    #[doc = "Nickel metal hydride battery"]
1378    MAV_BATTERY_TYPE_NIMH = 4,
1379}
1380impl MavBatteryType {
1381    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1382}
1383impl Default for MavBatteryType {
1384    fn default() -> Self {
1385        Self::DEFAULT
1386    }
1387}
1388#[cfg_attr(feature = "ts", derive(TS))]
1389#[cfg_attr(feature = "ts", ts(export))]
1390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1392#[cfg_attr(feature = "serde", serde(tag = "type"))]
1393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1394#[repr(u32)]
1395#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1396pub enum MavCmd {
1397    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1398    MAV_CMD_NAV_WAYPOINT = 16,
1399    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1400    MAV_CMD_NAV_LOITER_UNLIM = 17,
1401    #[doc = "Loiter around this waypoint for X turns"]
1402    MAV_CMD_NAV_LOITER_TURNS = 18,
1403    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1404    MAV_CMD_NAV_LOITER_TIME = 19,
1405    #[doc = "Return to launch location"]
1406    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1407    #[doc = "Land at location."]
1408    MAV_CMD_NAV_LAND = 21,
1409    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1410    MAV_CMD_NAV_TAKEOFF = 22,
1411    #[doc = "Land at local position (local frame only)"]
1412    MAV_CMD_NAV_LAND_LOCAL = 23,
1413    #[doc = "Takeoff from local position (local frame only)"]
1414    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1415    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1416    MAV_CMD_NAV_FOLLOW = 25,
1417    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1418    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1419    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1420    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1421    #[doc = "Begin following a target"]
1422    MAV_CMD_DO_FOLLOW = 32,
1423    #[doc = "Reposition the MAV after a follow target command has been sent"]
1424    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1425    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1426    MAV_CMD_DO_ORBIT = 34,
1427    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1428    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1429    MAV_CMD_NAV_ROI = 80,
1430    #[doc = "Control autonomous path planning on the MAV."]
1431    MAV_CMD_NAV_PATHPLANNING = 81,
1432    #[doc = "Navigate to waypoint using a spline path."]
1433    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1434    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1435    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1436    #[doc = "Land using VTOL mode"]
1437    MAV_CMD_NAV_VTOL_LAND = 85,
1438    #[doc = "hand control over to an external controller"]
1439    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1440    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1441    MAV_CMD_NAV_DELAY = 93,
1442    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1443    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1444    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1445    MAV_CMD_NAV_LAST = 95,
1446    #[doc = "Delay mission state machine."]
1447    MAV_CMD_CONDITION_DELAY = 112,
1448    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1449    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1450    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1451    MAV_CMD_CONDITION_DISTANCE = 114,
1452    #[doc = "Reach a certain target angle."]
1453    MAV_CMD_CONDITION_YAW = 115,
1454    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1455    MAV_CMD_CONDITION_LAST = 159,
1456    #[doc = "Set system mode."]
1457    MAV_CMD_DO_SET_MODE = 176,
1458    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1459    MAV_CMD_DO_JUMP = 177,
1460    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1461    MAV_CMD_DO_CHANGE_SPEED = 178,
1462    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1463    MAV_CMD_DO_SET_HOME = 179,
1464    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1465    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1466    MAV_CMD_DO_SET_PARAMETER = 180,
1467    #[doc = "Set a relay to a condition."]
1468    MAV_CMD_DO_SET_RELAY = 181,
1469    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1470    MAV_CMD_DO_REPEAT_RELAY = 182,
1471    #[doc = "Set a servo to a desired PWM value."]
1472    MAV_CMD_DO_SET_SERVO = 183,
1473    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1474    MAV_CMD_DO_REPEAT_SERVO = 184,
1475    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1476    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1477    #[doc = "Change altitude set point."]
1478    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1479    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1480    MAV_CMD_DO_SET_ACTUATOR = 187,
1481    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1482    MAV_CMD_DO_RETURN_PATH_START = 188,
1483    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1484    MAV_CMD_DO_LAND_START = 189,
1485    #[doc = "Mission command to perform a landing from a rally point."]
1486    MAV_CMD_DO_RALLY_LAND = 190,
1487    #[doc = "Mission command to safely abort an autonomous landing."]
1488    MAV_CMD_DO_GO_AROUND = 191,
1489    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1490    MAV_CMD_DO_REPOSITION = 192,
1491    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1492    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1493    #[doc = "Set moving direction to forward or reverse."]
1494    MAV_CMD_DO_SET_REVERSE = 194,
1495    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1496    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1497    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1498    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1499    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1500    MAV_CMD_DO_SET_ROI_NONE = 197,
1501    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1502    MAV_CMD_DO_SET_ROI_SYSID = 198,
1503    #[doc = "Control onboard camera system."]
1504    MAV_CMD_DO_CONTROL_VIDEO = 200,
1505    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1506    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1507    MAV_CMD_DO_SET_ROI = 201,
1508    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1509    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1510    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1511    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1512    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1513    #[doc = "Mission command to configure a camera or antenna mount"]
1514    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1515    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1516    #[doc = "Mission command to control a camera or antenna mount"]
1517    MAV_CMD_DO_MOUNT_CONTROL = 205,
1518    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1519    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1520    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1521    MAV_CMD_DO_FENCE_ENABLE = 207,
1522    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1523    MAV_CMD_DO_PARACHUTE = 208,
1524    #[doc = "Command to perform motor test."]
1525    MAV_CMD_DO_MOTOR_TEST = 209,
1526    #[doc = "Change to/from inverted flight."]
1527    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1528    #[doc = "Mission command to operate a gripper."]
1529    MAV_CMD_DO_GRIPPER = 211,
1530    #[doc = "Enable/disable autotune."]
1531    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1532    #[doc = "Sets a desired vehicle turn angle and speed change."]
1533    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1534    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1535    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1536    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1537    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1538    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1539    #[doc = "set id of master controller"]
1540    MAV_CMD_DO_GUIDED_MASTER = 221,
1541    #[doc = "Set limits for external control"]
1542    MAV_CMD_DO_GUIDED_LIMITS = 222,
1543    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1544    MAV_CMD_DO_ENGINE_CONTROL = 223,
1545    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1546    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1547    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1548    MAV_CMD_DO_LAST = 240,
1549    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1550    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1551    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1552    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1553    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1554    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1555    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1556    MAV_CMD_PREFLIGHT_STORAGE = 245,
1557    #[doc = "Request the reboot or shutdown of system components."]
1558    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1559    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1560    MAV_CMD_OVERRIDE_GOTO = 252,
1561    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1562    MAV_CMD_OBLIQUE_SURVEY = 260,
1563    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1564    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1565    #[doc = "start running a mission"]
1566    MAV_CMD_MISSION_START = 300,
1567    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1568    MAV_CMD_ACTUATOR_TEST = 310,
1569    #[doc = "Actuator configuration command."]
1570    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1571    #[doc = "Arms / Disarms a component"]
1572    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1573    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1574    MAV_CMD_RUN_PREARM_CHECKS = 401,
1575    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1576    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1577    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1578    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1579    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1580    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1581    MAV_CMD_GET_HOME_POSITION = 410,
1582    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1583    MAV_CMD_INJECT_FAILURE = 420,
1584    #[doc = "Starts receiver pairing."]
1585    MAV_CMD_START_RX_PAIR = 500,
1586    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1587    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1588    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1589    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1590    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1591    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1592    MAV_CMD_REQUEST_MESSAGE = 512,
1593    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1594    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1595    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1596    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1597    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1598    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1599    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1600    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1601    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1602    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1603    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1604    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1605    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1606    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1607    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1608    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1609    MAV_CMD_STORAGE_FORMAT = 526,
1610    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1611    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1612    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1613    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1614    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1615    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1616    #[doc = "Reset all camera settings to Factory Default"]
1617    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1618    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1619    MAV_CMD_SET_CAMERA_MODE = 530,
1620    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1621    MAV_CMD_SET_CAMERA_ZOOM = 531,
1622    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1623    MAV_CMD_SET_CAMERA_FOCUS = 532,
1624    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1625    MAV_CMD_SET_STORAGE_USAGE = 533,
1626    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1627    MAV_CMD_SET_CAMERA_SOURCE = 534,
1628    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1629    MAV_CMD_JUMP_TAG = 600,
1630    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1631    MAV_CMD_DO_JUMP_TAG = 601,
1632    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1633    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1634    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1635    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1636    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1637    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1638    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1639    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1640    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1641    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1642    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1643    #[doc = "Enable or disable on-board camera triggering system."]
1644    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1645    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1646    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1647    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1648    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1649    #[doc = "Stops ongoing tracking."]
1650    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1651    #[doc = "Starts video capture (recording)."]
1652    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1653    #[doc = "Stop the current video capture (recording)."]
1654    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1655    #[doc = "Start video streaming"]
1656    MAV_CMD_VIDEO_START_STREAMING = 2502,
1657    #[doc = "Stop the given video stream"]
1658    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1659    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1660    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1661    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1662    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1663    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1664    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1665    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1666    MAV_CMD_LOGGING_START = 2510,
1667    #[doc = "Request to stop streaming log data over MAVLink"]
1668    MAV_CMD_LOGGING_STOP = 2511,
1669    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1670    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1671    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1672    #[doc = "Create a panorama at the current position"]
1673    MAV_CMD_PANORAMA_CREATE = 2800,
1674    #[doc = "Request VTOL transition"]
1675    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1676    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1677    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1678    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1679    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1680    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1681    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1682    #[doc = "Delay mission state machine until gate has been reached."]
1683    MAV_CMD_CONDITION_GATE = 4501,
1684    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1685    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1686    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1687    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1688    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1689    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1690    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1691    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1692    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1693    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1694    #[doc = "Rally point. You can have multiple rally points defined."]
1695    MAV_CMD_NAV_RALLY_POINT = 5100,
1696    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1697    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1698    #[doc = "Change state of safety switch."]
1699    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1700    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1701    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1702    #[deprecated = "  (Deprecated since 2021-06)"]
1703    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1704    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1705    #[deprecated = "  (Deprecated since 2021-06)"]
1706    #[doc = "Control the payload deployment."]
1707    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1708    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1709    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1710    #[doc = "Command to operate winch."]
1711    MAV_CMD_DO_WINCH = 42600,
1712    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1713    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1714    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1715    MAV_CMD_WAYPOINT_USER_1 = 31000,
1716    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1717    MAV_CMD_WAYPOINT_USER_2 = 31001,
1718    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1719    MAV_CMD_WAYPOINT_USER_3 = 31002,
1720    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1721    MAV_CMD_WAYPOINT_USER_4 = 31003,
1722    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1723    MAV_CMD_WAYPOINT_USER_5 = 31004,
1724    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1725    MAV_CMD_SPATIAL_USER_1 = 31005,
1726    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1727    MAV_CMD_SPATIAL_USER_2 = 31006,
1728    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1729    MAV_CMD_SPATIAL_USER_3 = 31007,
1730    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1731    MAV_CMD_SPATIAL_USER_4 = 31008,
1732    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1733    MAV_CMD_SPATIAL_USER_5 = 31009,
1734    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1735    MAV_CMD_USER_1 = 31010,
1736    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1737    MAV_CMD_USER_2 = 31011,
1738    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1739    MAV_CMD_USER_3 = 31012,
1740    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1741    MAV_CMD_USER_4 = 31013,
1742    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1743    MAV_CMD_USER_5 = 31014,
1744    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1745    MAV_CMD_CAN_FORWARD = 32000,
1746}
1747impl MavCmd {
1748    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1749}
1750impl Default for MavCmd {
1751    fn default() -> Self {
1752        Self::DEFAULT
1753    }
1754}
1755#[cfg_attr(feature = "ts", derive(TS))]
1756#[cfg_attr(feature = "ts", ts(export))]
1757#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1759#[cfg_attr(feature = "serde", serde(tag = "type"))]
1760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1761#[repr(u32)]
1762#[doc = "Possible actions an aircraft can take to avoid a collision."]
1763pub enum MavCollisionAction {
1764    #[doc = "Ignore any potential collisions"]
1765    MAV_COLLISION_ACTION_NONE = 0,
1766    #[doc = "Report potential collision"]
1767    MAV_COLLISION_ACTION_REPORT = 1,
1768    #[doc = "Ascend or Descend to avoid threat"]
1769    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1770    #[doc = "Move horizontally to avoid threat"]
1771    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1772    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1773    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1774    #[doc = "Aircraft to fly directly back to its launch point"]
1775    MAV_COLLISION_ACTION_RTL = 5,
1776    #[doc = "Aircraft to stop in place"]
1777    MAV_COLLISION_ACTION_HOVER = 6,
1778}
1779impl MavCollisionAction {
1780    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1781}
1782impl Default for MavCollisionAction {
1783    fn default() -> Self {
1784        Self::DEFAULT
1785    }
1786}
1787#[cfg_attr(feature = "ts", derive(TS))]
1788#[cfg_attr(feature = "ts", ts(export))]
1789#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1790#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1791#[cfg_attr(feature = "serde", serde(tag = "type"))]
1792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1793#[repr(u32)]
1794#[doc = "Source of information about this collision."]
1795pub enum MavCollisionSrc {
1796    #[doc = "ID field references ADSB_VEHICLE packets"]
1797    MAV_COLLISION_SRC_ADSB = 0,
1798    #[doc = "ID field references MAVLink SRC ID"]
1799    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1800}
1801impl MavCollisionSrc {
1802    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1803}
1804impl Default for MavCollisionSrc {
1805    fn default() -> Self {
1806        Self::DEFAULT
1807    }
1808}
1809#[cfg_attr(feature = "ts", derive(TS))]
1810#[cfg_attr(feature = "ts", ts(export))]
1811#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1813#[cfg_attr(feature = "serde", serde(tag = "type"))]
1814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1815#[repr(u32)]
1816#[doc = "Aircraft-rated danger from this threat."]
1817pub enum MavCollisionThreatLevel {
1818    #[doc = "Not a threat"]
1819    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1820    #[doc = "Craft is mildly concerned about this threat"]
1821    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1822    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1823    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1824}
1825impl MavCollisionThreatLevel {
1826    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1827}
1828impl Default for MavCollisionThreatLevel {
1829    fn default() -> Self {
1830        Self::DEFAULT
1831    }
1832}
1833#[cfg_attr(feature = "ts", derive(TS))]
1834#[cfg_attr(feature = "ts", ts(export))]
1835#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1837#[cfg_attr(feature = "serde", serde(tag = "type"))]
1838#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1839#[repr(u32)]
1840#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1841pub enum MavComponent {
1842    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1843    MAV_COMP_ID_ALL = 0,
1844    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1845    MAV_COMP_ID_AUTOPILOT1 = 1,
1846    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1847    MAV_COMP_ID_USER1 = 25,
1848    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1849    MAV_COMP_ID_USER2 = 26,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER3 = 27,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER4 = 28,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER5 = 29,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER6 = 30,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER7 = 31,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER8 = 32,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER9 = 33,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER10 = 34,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER11 = 35,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER12 = 36,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER13 = 37,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER14 = 38,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER15 = 39,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER16 = 40,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER17 = 41,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER18 = 42,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER19 = 43,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER20 = 44,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER21 = 45,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER22 = 46,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER23 = 47,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER24 = 48,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER25 = 49,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER26 = 50,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER27 = 51,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER28 = 52,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER29 = 53,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER30 = 54,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER31 = 55,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER32 = 56,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER33 = 57,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER34 = 58,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER35 = 59,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER36 = 60,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER37 = 61,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER38 = 62,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER39 = 63,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER40 = 64,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER41 = 65,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER42 = 66,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER43 = 67,
1932    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1933    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1934    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1935    MAV_COMP_ID_USER45 = 69,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER46 = 70,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER47 = 71,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER48 = 72,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER49 = 73,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER50 = 74,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER51 = 75,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER52 = 76,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER53 = 77,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER54 = 78,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER55 = 79,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER56 = 80,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER57 = 81,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER58 = 82,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER59 = 83,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER60 = 84,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER61 = 85,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER62 = 86,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER63 = 87,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER64 = 88,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER65 = 89,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER66 = 90,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER67 = 91,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER68 = 92,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER69 = 93,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER70 = 94,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER71 = 95,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER72 = 96,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER73 = 97,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER74 = 98,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER75 = 99,
1996    #[doc = "Camera #1."]
1997    MAV_COMP_ID_CAMERA = 100,
1998    #[doc = "Camera #2."]
1999    MAV_COMP_ID_CAMERA2 = 101,
2000    #[doc = "Camera #3."]
2001    MAV_COMP_ID_CAMERA3 = 102,
2002    #[doc = "Camera #4."]
2003    MAV_COMP_ID_CAMERA4 = 103,
2004    #[doc = "Camera #5."]
2005    MAV_COMP_ID_CAMERA5 = 104,
2006    #[doc = "Camera #6."]
2007    MAV_COMP_ID_CAMERA6 = 105,
2008    #[doc = "Servo #1."]
2009    MAV_COMP_ID_SERVO1 = 140,
2010    #[doc = "Servo #2."]
2011    MAV_COMP_ID_SERVO2 = 141,
2012    #[doc = "Servo #3."]
2013    MAV_COMP_ID_SERVO3 = 142,
2014    #[doc = "Servo #4."]
2015    MAV_COMP_ID_SERVO4 = 143,
2016    #[doc = "Servo #5."]
2017    MAV_COMP_ID_SERVO5 = 144,
2018    #[doc = "Servo #6."]
2019    MAV_COMP_ID_SERVO6 = 145,
2020    #[doc = "Servo #7."]
2021    MAV_COMP_ID_SERVO7 = 146,
2022    #[doc = "Servo #8."]
2023    MAV_COMP_ID_SERVO8 = 147,
2024    #[doc = "Servo #9."]
2025    MAV_COMP_ID_SERVO9 = 148,
2026    #[doc = "Servo #10."]
2027    MAV_COMP_ID_SERVO10 = 149,
2028    #[doc = "Servo #11."]
2029    MAV_COMP_ID_SERVO11 = 150,
2030    #[doc = "Servo #12."]
2031    MAV_COMP_ID_SERVO12 = 151,
2032    #[doc = "Servo #13."]
2033    MAV_COMP_ID_SERVO13 = 152,
2034    #[doc = "Servo #14."]
2035    MAV_COMP_ID_SERVO14 = 153,
2036    #[doc = "Gimbal #1."]
2037    MAV_COMP_ID_GIMBAL = 154,
2038    #[doc = "Logging component."]
2039    MAV_COMP_ID_LOG = 155,
2040    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2041    MAV_COMP_ID_ADSB = 156,
2042    #[doc = "On Screen Display (OSD) devices for video links."]
2043    MAV_COMP_ID_OSD = 157,
2044    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2045    MAV_COMP_ID_PERIPHERAL = 158,
2046    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2047    #[doc = "Gimbal ID for QX1."]
2048    MAV_COMP_ID_QX1_GIMBAL = 159,
2049    #[doc = "FLARM collision alert component."]
2050    MAV_COMP_ID_FLARM = 160,
2051    #[doc = "Parachute component."]
2052    MAV_COMP_ID_PARACHUTE = 161,
2053    #[doc = "Winch component."]
2054    MAV_COMP_ID_WINCH = 169,
2055    #[doc = "Gimbal #2."]
2056    MAV_COMP_ID_GIMBAL2 = 171,
2057    #[doc = "Gimbal #3."]
2058    MAV_COMP_ID_GIMBAL3 = 172,
2059    #[doc = "Gimbal #4"]
2060    MAV_COMP_ID_GIMBAL4 = 173,
2061    #[doc = "Gimbal #5."]
2062    MAV_COMP_ID_GIMBAL5 = 174,
2063    #[doc = "Gimbal #6."]
2064    MAV_COMP_ID_GIMBAL6 = 175,
2065    #[doc = "Battery #1."]
2066    MAV_COMP_ID_BATTERY = 180,
2067    #[doc = "Battery #2."]
2068    MAV_COMP_ID_BATTERY2 = 181,
2069    #[doc = "CAN over MAVLink client."]
2070    MAV_COMP_ID_MAVCAN = 189,
2071    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2072    MAV_COMP_ID_MISSIONPLANNER = 190,
2073    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2074    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2075    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2076    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2077    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2078    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2079    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2080    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2081    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2082    MAV_COMP_ID_PATHPLANNER = 195,
2083    #[doc = "Component that plans a collision free path between two points."]
2084    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2085    #[doc = "Component that provides position estimates using VIO techniques."]
2086    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2087    #[doc = "Component that manages pairing of vehicle and GCS."]
2088    MAV_COMP_ID_PAIRING_MANAGER = 198,
2089    #[doc = "Inertial Measurement Unit (IMU) #1."]
2090    MAV_COMP_ID_IMU = 200,
2091    #[doc = "Inertial Measurement Unit (IMU) #2."]
2092    MAV_COMP_ID_IMU_2 = 201,
2093    #[doc = "Inertial Measurement Unit (IMU) #3."]
2094    MAV_COMP_ID_IMU_3 = 202,
2095    #[doc = "GPS #1."]
2096    MAV_COMP_ID_GPS = 220,
2097    #[doc = "GPS #2."]
2098    MAV_COMP_ID_GPS2 = 221,
2099    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2100    MAV_COMP_ID_ODID_TXRX_1 = 236,
2101    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2102    MAV_COMP_ID_ODID_TXRX_2 = 237,
2103    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2104    MAV_COMP_ID_ODID_TXRX_3 = 238,
2105    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2106    MAV_COMP_ID_UDP_BRIDGE = 240,
2107    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2108    MAV_COMP_ID_UART_BRIDGE = 241,
2109    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2110    MAV_COMP_ID_TUNNEL_NODE = 242,
2111    #[doc = "Illuminator"]
2112    MAV_COMP_ID_ILLUMINATOR = 243,
2113    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2114    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2115    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2116}
2117impl MavComponent {
2118    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2119}
2120impl Default for MavComponent {
2121    fn default() -> Self {
2122        Self::DEFAULT
2123    }
2124}
2125#[cfg_attr(feature = "ts", derive(TS))]
2126#[cfg_attr(feature = "ts", ts(export))]
2127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2129#[cfg_attr(feature = "serde", serde(tag = "type"))]
2130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2131#[repr(u32)]
2132#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2133#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2134pub enum MavDataStream {
2135    #[doc = "Enable all data streams"]
2136    MAV_DATA_STREAM_ALL = 0,
2137    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2138    MAV_DATA_STREAM_RAW_SENSORS = 1,
2139    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2140    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2141    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2142    MAV_DATA_STREAM_RC_CHANNELS = 3,
2143    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2144    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2145    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2146    MAV_DATA_STREAM_POSITION = 6,
2147    #[doc = "Dependent on the autopilot"]
2148    MAV_DATA_STREAM_EXTRA1 = 10,
2149    #[doc = "Dependent on the autopilot"]
2150    MAV_DATA_STREAM_EXTRA2 = 11,
2151    #[doc = "Dependent on the autopilot"]
2152    MAV_DATA_STREAM_EXTRA3 = 12,
2153}
2154impl MavDataStream {
2155    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2156}
2157impl Default for MavDataStream {
2158    fn default() -> Self {
2159        Self::DEFAULT
2160    }
2161}
2162#[cfg_attr(feature = "ts", derive(TS))]
2163#[cfg_attr(feature = "ts", ts(export))]
2164#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2166#[cfg_attr(feature = "serde", serde(tag = "type"))]
2167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2168#[repr(u32)]
2169#[doc = "Enumeration of distance sensor types"]
2170pub enum MavDistanceSensor {
2171    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2172    MAV_DISTANCE_SENSOR_LASER = 0,
2173    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2174    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2175    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2176    MAV_DISTANCE_SENSOR_INFRARED = 2,
2177    #[doc = "Radar type, e.g. uLanding units"]
2178    MAV_DISTANCE_SENSOR_RADAR = 3,
2179    #[doc = "Broken or unknown type, e.g. analog units"]
2180    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2181}
2182impl MavDistanceSensor {
2183    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2184}
2185impl Default for MavDistanceSensor {
2186    fn default() -> Self {
2187        Self::DEFAULT
2188    }
2189}
2190#[cfg_attr(feature = "ts", derive(TS))]
2191#[cfg_attr(feature = "ts", ts(export))]
2192#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2194#[cfg_attr(feature = "serde", serde(tag = "type"))]
2195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2196#[repr(u32)]
2197#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2198pub enum MavDoRepositionFlags {
2199    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2200    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2201}
2202impl MavDoRepositionFlags {
2203    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2204}
2205impl Default for MavDoRepositionFlags {
2206    fn default() -> Self {
2207        Self::DEFAULT
2208    }
2209}
2210#[cfg_attr(feature = "ts", derive(TS))]
2211#[cfg_attr(feature = "ts", ts(export))]
2212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2214#[cfg_attr(feature = "serde", serde(tag = "type"))]
2215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2216#[repr(u32)]
2217#[doc = "Enumeration of estimator types"]
2218pub enum MavEstimatorType {
2219    #[doc = "Unknown type of the estimator."]
2220    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2221    #[doc = "This is a naive estimator without any real covariance feedback."]
2222    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2223    #[doc = "Computer vision based estimate. Might be up to scale."]
2224    MAV_ESTIMATOR_TYPE_VISION = 2,
2225    #[doc = "Visual-inertial estimate."]
2226    MAV_ESTIMATOR_TYPE_VIO = 3,
2227    #[doc = "Plain GPS estimate."]
2228    MAV_ESTIMATOR_TYPE_GPS = 4,
2229    #[doc = "Estimator integrating GPS and inertial sensing."]
2230    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2231    #[doc = "Estimate from external motion capturing system."]
2232    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2233    #[doc = "Estimator based on lidar sensor input."]
2234    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2235    #[doc = "Estimator on autopilot."]
2236    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2237}
2238impl MavEstimatorType {
2239    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2240}
2241impl Default for MavEstimatorType {
2242    fn default() -> Self {
2243        Self::DEFAULT
2244    }
2245}
2246#[cfg_attr(feature = "ts", derive(TS))]
2247#[cfg_attr(feature = "ts", ts(export))]
2248#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2250#[cfg_attr(feature = "serde", serde(tag = "type"))]
2251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2252#[repr(u32)]
2253#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2254pub enum MavEventCurrentSequenceFlags {
2255    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2256    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2257}
2258impl MavEventCurrentSequenceFlags {
2259    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2260}
2261impl Default for MavEventCurrentSequenceFlags {
2262    fn default() -> Self {
2263        Self::DEFAULT
2264    }
2265}
2266#[cfg_attr(feature = "ts", derive(TS))]
2267#[cfg_attr(feature = "ts", ts(export))]
2268#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2270#[cfg_attr(feature = "serde", serde(tag = "type"))]
2271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2272#[repr(u32)]
2273#[doc = "Reason for an event error response."]
2274pub enum MavEventErrorReason {
2275    #[doc = "The requested event is not available (anymore)."]
2276    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2277}
2278impl MavEventErrorReason {
2279    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2280}
2281impl Default for MavEventErrorReason {
2282    fn default() -> Self {
2283        Self::DEFAULT
2284    }
2285}
2286#[cfg_attr(feature = "ts", derive(TS))]
2287#[cfg_attr(feature = "ts", ts(export))]
2288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2290#[cfg_attr(feature = "serde", serde(tag = "type"))]
2291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2292#[repr(u32)]
2293#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2294pub enum MavFrame {
2295    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2296    MAV_FRAME_GLOBAL = 0,
2297    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2298    MAV_FRAME_LOCAL_NED = 1,
2299    #[doc = "NOT a coordinate frame, indicates a mission command."]
2300    MAV_FRAME_MISSION = 2,
2301    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2302    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2303    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2304    MAV_FRAME_LOCAL_ENU = 4,
2305    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2306    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2307    MAV_FRAME_GLOBAL_INT = 5,
2308    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2309    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2310    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2311    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2312    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2313    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2314    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2315    MAV_FRAME_BODY_NED = 8,
2316    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2317    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2318    MAV_FRAME_BODY_OFFSET_NED = 9,
2319    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2320    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2321    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2322    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2323    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2324    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2325    MAV_FRAME_BODY_FRD = 12,
2326    #[deprecated = "  (Deprecated since 2019-04)"]
2327    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2328    MAV_FRAME_RESERVED_13 = 13,
2329    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2330    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2331    MAV_FRAME_RESERVED_14 = 14,
2332    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2333    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2334    MAV_FRAME_RESERVED_15 = 15,
2335    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2336    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2337    MAV_FRAME_RESERVED_16 = 16,
2338    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2339    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2340    MAV_FRAME_RESERVED_17 = 17,
2341    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2342    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2343    MAV_FRAME_RESERVED_18 = 18,
2344    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2345    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2346    MAV_FRAME_RESERVED_19 = 19,
2347    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2348    MAV_FRAME_LOCAL_FRD = 20,
2349    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2350    MAV_FRAME_LOCAL_FLU = 21,
2351}
2352impl MavFrame {
2353    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2354}
2355impl Default for MavFrame {
2356    fn default() -> Self {
2357        Self::DEFAULT
2358    }
2359}
2360#[cfg_attr(feature = "ts", derive(TS))]
2361#[cfg_attr(feature = "ts", ts(export))]
2362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2364#[cfg_attr(feature = "serde", serde(tag = "type"))]
2365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2366#[repr(u32)]
2367#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2368pub enum MavFtpErr {
2369    #[doc = "None: No error"]
2370    MAV_FTP_ERR_NONE = 0,
2371    #[doc = "Fail: Unknown failure"]
2372    MAV_FTP_ERR_FAIL = 1,
2373    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2374    MAV_FTP_ERR_FAILERRNO = 2,
2375    #[doc = "InvalidDataSize: Payload size is invalid"]
2376    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2377    #[doc = "InvalidSession: Session is not currently open"]
2378    MAV_FTP_ERR_INVALIDSESSION = 4,
2379    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2380    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2381    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2382    MAV_FTP_ERR_EOF = 6,
2383    #[doc = "UnknownCommand: Unknown command / opcode"]
2384    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2385    #[doc = "FileExists: File/directory already exists"]
2386    MAV_FTP_ERR_FILEEXISTS = 8,
2387    #[doc = "FileProtected: File/directory is write protected"]
2388    MAV_FTP_ERR_FILEPROTECTED = 9,
2389    #[doc = "FileNotFound: File/directory not found"]
2390    MAV_FTP_ERR_FILENOTFOUND = 10,
2391}
2392impl MavFtpErr {
2393    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2394}
2395impl Default for MavFtpErr {
2396    fn default() -> Self {
2397        Self::DEFAULT
2398    }
2399}
2400#[cfg_attr(feature = "ts", derive(TS))]
2401#[cfg_attr(feature = "ts", ts(export))]
2402#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2404#[cfg_attr(feature = "serde", serde(tag = "type"))]
2405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2406#[repr(u32)]
2407#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2408pub enum MavFtpOpcode {
2409    #[doc = "None. Ignored, always ACKed"]
2410    MAV_FTP_OPCODE_NONE = 0,
2411    #[doc = "TerminateSession: Terminates open Read session"]
2412    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2413    #[doc = "ResetSessions: Terminates all open read sessions"]
2414    MAV_FTP_OPCODE_RESETSESSION = 2,
2415    #[doc = "ListDirectory. List files and directories in path from offset"]
2416    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2417    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2418    MAV_FTP_OPCODE_OPENFILERO = 4,
2419    #[doc = "ReadFile: Reads size bytes from offset in session"]
2420    MAV_FTP_OPCODE_READFILE = 5,
2421    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2422    MAV_FTP_OPCODE_CREATEFILE = 6,
2423    #[doc = "WriteFile: Writes size bytes to offset in session"]
2424    MAV_FTP_OPCODE_WRITEFILE = 7,
2425    #[doc = "RemoveFile: Remove file at path"]
2426    MAV_FTP_OPCODE_REMOVEFILE = 8,
2427    #[doc = "CreateDirectory: Creates directory at path"]
2428    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2429    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2430    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2431    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2432    MAV_FTP_OPCODE_OPENFILEWO = 11,
2433    #[doc = "TruncateFile: Truncate file at path to offset length"]
2434    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2435    #[doc = "Rename: Rename path1 to path2"]
2436    MAV_FTP_OPCODE_RENAME = 13,
2437    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2438    MAV_FTP_OPCODE_CALCFILECRC = 14,
2439    #[doc = "BurstReadFile: Burst download session file"]
2440    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2441    #[doc = "ACK: ACK response"]
2442    MAV_FTP_OPCODE_ACK = 128,
2443    #[doc = "NAK: NAK response"]
2444    MAV_FTP_OPCODE_NAK = 129,
2445}
2446impl MavFtpOpcode {
2447    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2448}
2449impl Default for MavFtpOpcode {
2450    fn default() -> Self {
2451        Self::DEFAULT
2452    }
2453}
2454#[cfg_attr(feature = "ts", derive(TS))]
2455#[cfg_attr(feature = "ts", ts(export))]
2456#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2458#[cfg_attr(feature = "serde", serde(tag = "type"))]
2459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2460#[repr(u32)]
2461#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2462pub enum MavFuelType {
2463    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2464    MAV_FUEL_TYPE_UNKNOWN = 0,
2465    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2466    MAV_FUEL_TYPE_LIQUID = 1,
2467    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2468    MAV_FUEL_TYPE_GAS = 2,
2469}
2470impl MavFuelType {
2471    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2472}
2473impl Default for MavFuelType {
2474    fn default() -> Self {
2475        Self::DEFAULT
2476    }
2477}
2478bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2479impl MavGeneratorStatusFlag {
2480    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2481}
2482impl Default for MavGeneratorStatusFlag {
2483    fn default() -> Self {
2484        Self::DEFAULT
2485    }
2486}
2487#[cfg_attr(feature = "ts", derive(TS))]
2488#[cfg_attr(feature = "ts", ts(export))]
2489#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2490#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2491#[cfg_attr(feature = "serde", serde(tag = "type"))]
2492#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2493#[repr(u32)]
2494#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2495pub enum MavGoto {
2496    #[doc = "Hold at the current position."]
2497    MAV_GOTO_DO_HOLD = 0,
2498    #[doc = "Continue with the next item in mission execution."]
2499    MAV_GOTO_DO_CONTINUE = 1,
2500    #[doc = "Hold at the current position of the system"]
2501    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2502    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2503    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2504}
2505impl MavGoto {
2506    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2507}
2508impl Default for MavGoto {
2509    fn default() -> Self {
2510        Self::DEFAULT
2511    }
2512}
2513#[cfg_attr(feature = "ts", derive(TS))]
2514#[cfg_attr(feature = "ts", ts(export))]
2515#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2517#[cfg_attr(feature = "serde", serde(tag = "type"))]
2518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2519#[repr(u32)]
2520#[doc = "Enumeration of landed detector states"]
2521pub enum MavLandedState {
2522    #[doc = "MAV landed state is unknown"]
2523    MAV_LANDED_STATE_UNDEFINED = 0,
2524    #[doc = "MAV is landed (on ground)"]
2525    MAV_LANDED_STATE_ON_GROUND = 1,
2526    #[doc = "MAV is in air"]
2527    MAV_LANDED_STATE_IN_AIR = 2,
2528    #[doc = "MAV currently taking off"]
2529    MAV_LANDED_STATE_TAKEOFF = 3,
2530    #[doc = "MAV currently landing"]
2531    MAV_LANDED_STATE_LANDING = 4,
2532}
2533impl MavLandedState {
2534    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2535}
2536impl Default for MavLandedState {
2537    fn default() -> Self {
2538        Self::DEFAULT
2539    }
2540}
2541#[cfg_attr(feature = "ts", derive(TS))]
2542#[cfg_attr(feature = "ts", ts(export))]
2543#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2544#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2545#[cfg_attr(feature = "serde", serde(tag = "type"))]
2546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2547#[repr(u32)]
2548#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2549pub enum MavMissionResult {
2550    #[doc = "mission accepted OK"]
2551    MAV_MISSION_ACCEPTED = 0,
2552    #[doc = "Generic error / not accepting mission commands at all right now."]
2553    MAV_MISSION_ERROR = 1,
2554    #[doc = "Coordinate frame is not supported."]
2555    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2556    #[doc = "Command is not supported."]
2557    MAV_MISSION_UNSUPPORTED = 3,
2558    #[doc = "Mission items exceed storage space."]
2559    MAV_MISSION_NO_SPACE = 4,
2560    #[doc = "One of the parameters has an invalid value."]
2561    MAV_MISSION_INVALID = 5,
2562    #[doc = "param1 has an invalid value."]
2563    MAV_MISSION_INVALID_PARAM1 = 6,
2564    #[doc = "param2 has an invalid value."]
2565    MAV_MISSION_INVALID_PARAM2 = 7,
2566    #[doc = "param3 has an invalid value."]
2567    MAV_MISSION_INVALID_PARAM3 = 8,
2568    #[doc = "param4 has an invalid value."]
2569    MAV_MISSION_INVALID_PARAM4 = 9,
2570    #[doc = "x / param5 has an invalid value."]
2571    MAV_MISSION_INVALID_PARAM5_X = 10,
2572    #[doc = "y / param6 has an invalid value."]
2573    MAV_MISSION_INVALID_PARAM6_Y = 11,
2574    #[doc = "z / param7 has an invalid value."]
2575    MAV_MISSION_INVALID_PARAM7 = 12,
2576    #[doc = "Mission item received out of sequence"]
2577    MAV_MISSION_INVALID_SEQUENCE = 13,
2578    #[doc = "Not accepting any mission commands from this communication partner."]
2579    MAV_MISSION_DENIED = 14,
2580    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2581    MAV_MISSION_OPERATION_CANCELLED = 15,
2582}
2583impl MavMissionResult {
2584    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2585}
2586impl Default for MavMissionResult {
2587    fn default() -> Self {
2588        Self::DEFAULT
2589    }
2590}
2591#[cfg_attr(feature = "ts", derive(TS))]
2592#[cfg_attr(feature = "ts", ts(export))]
2593#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2595#[cfg_attr(feature = "serde", serde(tag = "type"))]
2596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2597#[repr(u32)]
2598#[doc = "Type of mission items being requested/sent in mission protocol."]
2599pub enum MavMissionType {
2600    #[doc = "Items are mission commands for main mission."]
2601    MAV_MISSION_TYPE_MISSION = 0,
2602    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2603    MAV_MISSION_TYPE_FENCE = 1,
2604    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2605    MAV_MISSION_TYPE_RALLY = 2,
2606    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2607    MAV_MISSION_TYPE_ALL = 255,
2608}
2609impl MavMissionType {
2610    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2611}
2612impl Default for MavMissionType {
2613    fn default() -> Self {
2614        Self::DEFAULT
2615    }
2616}
2617#[cfg_attr(feature = "ts", derive(TS))]
2618#[cfg_attr(feature = "ts", ts(export))]
2619#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2620#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2621#[cfg_attr(feature = "serde", serde(tag = "type"))]
2622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2623#[repr(u32)]
2624#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2625pub enum MavMode {
2626    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2627    MAV_MODE_PREFLIGHT = 0,
2628    #[doc = "System is allowed to be active, under assisted RC control."]
2629    MAV_MODE_STABILIZE_DISARMED = 80,
2630    #[doc = "System is allowed to be active, under assisted RC control."]
2631    MAV_MODE_STABILIZE_ARMED = 208,
2632    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2633    MAV_MODE_MANUAL_DISARMED = 64,
2634    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2635    MAV_MODE_MANUAL_ARMED = 192,
2636    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2637    MAV_MODE_GUIDED_DISARMED = 88,
2638    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2639    MAV_MODE_GUIDED_ARMED = 216,
2640    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2641    MAV_MODE_AUTO_DISARMED = 92,
2642    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2643    MAV_MODE_AUTO_ARMED = 220,
2644    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2645    MAV_MODE_TEST_DISARMED = 66,
2646    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2647    MAV_MODE_TEST_ARMED = 194,
2648}
2649impl MavMode {
2650    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2651}
2652impl Default for MavMode {
2653    fn default() -> Self {
2654        Self::DEFAULT
2655    }
2656}
2657bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2658impl MavModeFlag {
2659    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2660}
2661impl Default for MavModeFlag {
2662    fn default() -> Self {
2663        Self::DEFAULT
2664    }
2665}
2666#[cfg_attr(feature = "ts", derive(TS))]
2667#[cfg_attr(feature = "ts", ts(export))]
2668#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2670#[cfg_attr(feature = "serde", serde(tag = "type"))]
2671#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2672#[repr(u32)]
2673#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2674pub enum MavModeFlagDecodePosition {
2675    #[doc = "First bit:  10000000"]
2676    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2677    #[doc = "Second bit: 01000000"]
2678    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2679    #[doc = "Third bit:  00100000"]
2680    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2681    #[doc = "Fourth bit: 00010000"]
2682    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2683    #[doc = "Fifth bit:  00001000"]
2684    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2685    #[doc = "Sixth bit:   00000100"]
2686    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2687    #[doc = "Seventh bit: 00000010"]
2688    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2689    #[doc = "Eighth bit: 00000001"]
2690    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2691}
2692impl MavModeFlagDecodePosition {
2693    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2694}
2695impl Default for MavModeFlagDecodePosition {
2696    fn default() -> Self {
2697        Self::DEFAULT
2698    }
2699}
2700bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2701impl MavModeProperty {
2702    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2703}
2704impl Default for MavModeProperty {
2705    fn default() -> Self {
2706        Self::DEFAULT
2707    }
2708}
2709#[cfg_attr(feature = "ts", derive(TS))]
2710#[cfg_attr(feature = "ts", ts(export))]
2711#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2713#[cfg_attr(feature = "serde", serde(tag = "type"))]
2714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2715#[repr(u32)]
2716#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2717#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2718pub enum MavMountMode {
2719    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2720    MAV_MOUNT_MODE_RETRACT = 0,
2721    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2722    MAV_MOUNT_MODE_NEUTRAL = 1,
2723    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2724    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2725    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2726    MAV_MOUNT_MODE_RC_TARGETING = 3,
2727    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2728    MAV_MOUNT_MODE_GPS_POINT = 4,
2729    #[doc = "Gimbal tracks system with specified system ID"]
2730    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2731    #[doc = "Gimbal tracks home position"]
2732    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2733}
2734impl MavMountMode {
2735    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2736}
2737impl Default for MavMountMode {
2738    fn default() -> Self {
2739        Self::DEFAULT
2740    }
2741}
2742#[cfg_attr(feature = "ts", derive(TS))]
2743#[cfg_attr(feature = "ts", ts(export))]
2744#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2746#[cfg_attr(feature = "serde", serde(tag = "type"))]
2747#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2748#[repr(u32)]
2749pub enum MavOdidArmStatus {
2750    #[doc = "Passing arming checks."]
2751    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2752    #[doc = "Generic arming failure, see error string for details."]
2753    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2754}
2755impl MavOdidArmStatus {
2756    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2757}
2758impl Default for MavOdidArmStatus {
2759    fn default() -> Self {
2760        Self::DEFAULT
2761    }
2762}
2763#[cfg_attr(feature = "ts", derive(TS))]
2764#[cfg_attr(feature = "ts", ts(export))]
2765#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2767#[cfg_attr(feature = "serde", serde(tag = "type"))]
2768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2769#[repr(u32)]
2770pub enum MavOdidAuthType {
2771    #[doc = "No authentication type is specified."]
2772    MAV_ODID_AUTH_TYPE_NONE = 0,
2773    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2774    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2775    #[doc = "Signature for the Operator ID."]
2776    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2777    #[doc = "Signature for the entire message set."]
2778    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2779    #[doc = "Authentication is provided by Network Remote ID."]
2780    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2781    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2782    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2783}
2784impl MavOdidAuthType {
2785    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2786}
2787impl Default for MavOdidAuthType {
2788    fn default() -> Self {
2789        Self::DEFAULT
2790    }
2791}
2792#[cfg_attr(feature = "ts", derive(TS))]
2793#[cfg_attr(feature = "ts", ts(export))]
2794#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2796#[cfg_attr(feature = "serde", serde(tag = "type"))]
2797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2798#[repr(u32)]
2799pub enum MavOdidCategoryEu {
2800    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2801    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2802    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2803    MAV_ODID_CATEGORY_EU_OPEN = 1,
2804    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2805    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2806    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2807    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2808}
2809impl MavOdidCategoryEu {
2810    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2811}
2812impl Default for MavOdidCategoryEu {
2813    fn default() -> Self {
2814        Self::DEFAULT
2815    }
2816}
2817#[cfg_attr(feature = "ts", derive(TS))]
2818#[cfg_attr(feature = "ts", ts(export))]
2819#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2821#[cfg_attr(feature = "serde", serde(tag = "type"))]
2822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2823#[repr(u32)]
2824pub enum MavOdidClassEu {
2825    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2826    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2827    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2828    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2829    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2830    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2831    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2832    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2833    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2834    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2835    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2836    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2837    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2838    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2839    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2840    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2841}
2842impl MavOdidClassEu {
2843    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2844}
2845impl Default for MavOdidClassEu {
2846    fn default() -> Self {
2847        Self::DEFAULT
2848    }
2849}
2850#[cfg_attr(feature = "ts", derive(TS))]
2851#[cfg_attr(feature = "ts", ts(export))]
2852#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2853#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2854#[cfg_attr(feature = "serde", serde(tag = "type"))]
2855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2856#[repr(u32)]
2857pub enum MavOdidClassificationType {
2858    #[doc = "The classification type for the UA is undeclared."]
2859    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2860    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2861    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2862}
2863impl MavOdidClassificationType {
2864    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2865}
2866impl Default for MavOdidClassificationType {
2867    fn default() -> Self {
2868        Self::DEFAULT
2869    }
2870}
2871#[cfg_attr(feature = "ts", derive(TS))]
2872#[cfg_attr(feature = "ts", ts(export))]
2873#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2875#[cfg_attr(feature = "serde", serde(tag = "type"))]
2876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2877#[repr(u32)]
2878pub enum MavOdidDescType {
2879    #[doc = "Optional free-form text description of the purpose of the flight."]
2880    MAV_ODID_DESC_TYPE_TEXT = 0,
2881    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2882    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2883    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2884    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2885}
2886impl MavOdidDescType {
2887    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2888}
2889impl Default for MavOdidDescType {
2890    fn default() -> Self {
2891        Self::DEFAULT
2892    }
2893}
2894#[cfg_attr(feature = "ts", derive(TS))]
2895#[cfg_attr(feature = "ts", ts(export))]
2896#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2898#[cfg_attr(feature = "serde", serde(tag = "type"))]
2899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2900#[repr(u32)]
2901pub enum MavOdidHeightRef {
2902    #[doc = "The height field is relative to the take-off location."]
2903    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2904    #[doc = "The height field is relative to ground."]
2905    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2906}
2907impl MavOdidHeightRef {
2908    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2909}
2910impl Default for MavOdidHeightRef {
2911    fn default() -> Self {
2912        Self::DEFAULT
2913    }
2914}
2915#[cfg_attr(feature = "ts", derive(TS))]
2916#[cfg_attr(feature = "ts", ts(export))]
2917#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2919#[cfg_attr(feature = "serde", serde(tag = "type"))]
2920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2921#[repr(u32)]
2922pub enum MavOdidHorAcc {
2923    #[doc = "The horizontal accuracy is unknown."]
2924    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2925    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2926    MAV_ODID_HOR_ACC_10NM = 1,
2927    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2928    MAV_ODID_HOR_ACC_4NM = 2,
2929    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2930    MAV_ODID_HOR_ACC_2NM = 3,
2931    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2932    MAV_ODID_HOR_ACC_1NM = 4,
2933    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2934    MAV_ODID_HOR_ACC_0_5NM = 5,
2935    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2936    MAV_ODID_HOR_ACC_0_3NM = 6,
2937    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2938    MAV_ODID_HOR_ACC_0_1NM = 7,
2939    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2940    MAV_ODID_HOR_ACC_0_05NM = 8,
2941    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2942    MAV_ODID_HOR_ACC_30_METER = 9,
2943    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2944    MAV_ODID_HOR_ACC_10_METER = 10,
2945    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2946    MAV_ODID_HOR_ACC_3_METER = 11,
2947    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2948    MAV_ODID_HOR_ACC_1_METER = 12,
2949}
2950impl MavOdidHorAcc {
2951    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2952}
2953impl Default for MavOdidHorAcc {
2954    fn default() -> Self {
2955        Self::DEFAULT
2956    }
2957}
2958#[cfg_attr(feature = "ts", derive(TS))]
2959#[cfg_attr(feature = "ts", ts(export))]
2960#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2962#[cfg_attr(feature = "serde", serde(tag = "type"))]
2963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2964#[repr(u32)]
2965pub enum MavOdidIdType {
2966    #[doc = "No type defined."]
2967    MAV_ODID_ID_TYPE_NONE = 0,
2968    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2969    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2970    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2971    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2972    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2973    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2974    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2975    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2976}
2977impl MavOdidIdType {
2978    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2979}
2980impl Default for MavOdidIdType {
2981    fn default() -> Self {
2982        Self::DEFAULT
2983    }
2984}
2985#[cfg_attr(feature = "ts", derive(TS))]
2986#[cfg_attr(feature = "ts", ts(export))]
2987#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2988#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2989#[cfg_attr(feature = "serde", serde(tag = "type"))]
2990#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2991#[repr(u32)]
2992pub enum MavOdidOperatorIdType {
2993    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2994    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2995}
2996impl MavOdidOperatorIdType {
2997    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2998}
2999impl Default for MavOdidOperatorIdType {
3000    fn default() -> Self {
3001        Self::DEFAULT
3002    }
3003}
3004#[cfg_attr(feature = "ts", derive(TS))]
3005#[cfg_attr(feature = "ts", ts(export))]
3006#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3008#[cfg_attr(feature = "serde", serde(tag = "type"))]
3009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3010#[repr(u32)]
3011pub enum MavOdidOperatorLocationType {
3012    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3013    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3014    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3015    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3016    #[doc = "The location/altitude of the operator are fixed values."]
3017    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3018}
3019impl MavOdidOperatorLocationType {
3020    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3021}
3022impl Default for MavOdidOperatorLocationType {
3023    fn default() -> Self {
3024        Self::DEFAULT
3025    }
3026}
3027#[cfg_attr(feature = "ts", derive(TS))]
3028#[cfg_attr(feature = "ts", ts(export))]
3029#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3031#[cfg_attr(feature = "serde", serde(tag = "type"))]
3032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3033#[repr(u32)]
3034pub enum MavOdidSpeedAcc {
3035    #[doc = "The speed accuracy is unknown."]
3036    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3037    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3038    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3039    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3040    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3041    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3042    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3043    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3044    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3045}
3046impl MavOdidSpeedAcc {
3047    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3048}
3049impl Default for MavOdidSpeedAcc {
3050    fn default() -> Self {
3051        Self::DEFAULT
3052    }
3053}
3054#[cfg_attr(feature = "ts", derive(TS))]
3055#[cfg_attr(feature = "ts", ts(export))]
3056#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3058#[cfg_attr(feature = "serde", serde(tag = "type"))]
3059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3060#[repr(u32)]
3061pub enum MavOdidStatus {
3062    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3063    MAV_ODID_STATUS_UNDECLARED = 0,
3064    #[doc = "The UA is on the ground."]
3065    MAV_ODID_STATUS_GROUND = 1,
3066    #[doc = "The UA is in the air."]
3067    MAV_ODID_STATUS_AIRBORNE = 2,
3068    #[doc = "The UA is having an emergency."]
3069    MAV_ODID_STATUS_EMERGENCY = 3,
3070    #[doc = "The remote ID system is failing or unreliable in some way."]
3071    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3072}
3073impl MavOdidStatus {
3074    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3075}
3076impl Default for MavOdidStatus {
3077    fn default() -> Self {
3078        Self::DEFAULT
3079    }
3080}
3081#[cfg_attr(feature = "ts", derive(TS))]
3082#[cfg_attr(feature = "ts", ts(export))]
3083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3085#[cfg_attr(feature = "serde", serde(tag = "type"))]
3086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3087#[repr(u32)]
3088pub enum MavOdidTimeAcc {
3089    #[doc = "The timestamp accuracy is unknown."]
3090    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3091    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3092    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3093    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3094    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3095    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3096    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3097    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3098    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3099    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3100    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3101    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3102    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3103    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3104    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3105    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3106    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3107    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3108    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3109    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3110    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3111    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3112    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3113    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3114    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3115    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3116    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3117    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3118    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3119    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3120    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3121}
3122impl MavOdidTimeAcc {
3123    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3124}
3125impl Default for MavOdidTimeAcc {
3126    fn default() -> Self {
3127        Self::DEFAULT
3128    }
3129}
3130#[cfg_attr(feature = "ts", derive(TS))]
3131#[cfg_attr(feature = "ts", ts(export))]
3132#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3134#[cfg_attr(feature = "serde", serde(tag = "type"))]
3135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3136#[repr(u32)]
3137pub enum MavOdidUaType {
3138    #[doc = "No UA (Unmanned Aircraft) type defined."]
3139    MAV_ODID_UA_TYPE_NONE = 0,
3140    #[doc = "Aeroplane/Airplane. Fixed wing."]
3141    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3142    #[doc = "Helicopter or multirotor."]
3143    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3144    #[doc = "Gyroplane."]
3145    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3146    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3147    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3148    #[doc = "Ornithopter."]
3149    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3150    #[doc = "Glider."]
3151    MAV_ODID_UA_TYPE_GLIDER = 6,
3152    #[doc = "Kite."]
3153    MAV_ODID_UA_TYPE_KITE = 7,
3154    #[doc = "Free Balloon."]
3155    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3156    #[doc = "Captive Balloon."]
3157    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3158    #[doc = "Airship. E.g. a blimp."]
3159    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3160    #[doc = "Free Fall/Parachute (unpowered)."]
3161    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3162    #[doc = "Rocket."]
3163    MAV_ODID_UA_TYPE_ROCKET = 12,
3164    #[doc = "Tethered powered aircraft."]
3165    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3166    #[doc = "Ground Obstacle."]
3167    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3168    #[doc = "Other type of aircraft not listed earlier."]
3169    MAV_ODID_UA_TYPE_OTHER = 15,
3170}
3171impl MavOdidUaType {
3172    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3173}
3174impl Default for MavOdidUaType {
3175    fn default() -> Self {
3176        Self::DEFAULT
3177    }
3178}
3179#[cfg_attr(feature = "ts", derive(TS))]
3180#[cfg_attr(feature = "ts", ts(export))]
3181#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3183#[cfg_attr(feature = "serde", serde(tag = "type"))]
3184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3185#[repr(u32)]
3186pub enum MavOdidVerAcc {
3187    #[doc = "The vertical accuracy is unknown."]
3188    MAV_ODID_VER_ACC_UNKNOWN = 0,
3189    #[doc = "The vertical accuracy is smaller than 150 meter."]
3190    MAV_ODID_VER_ACC_150_METER = 1,
3191    #[doc = "The vertical accuracy is smaller than 45 meter."]
3192    MAV_ODID_VER_ACC_45_METER = 2,
3193    #[doc = "The vertical accuracy is smaller than 25 meter."]
3194    MAV_ODID_VER_ACC_25_METER = 3,
3195    #[doc = "The vertical accuracy is smaller than 10 meter."]
3196    MAV_ODID_VER_ACC_10_METER = 4,
3197    #[doc = "The vertical accuracy is smaller than 3 meter."]
3198    MAV_ODID_VER_ACC_3_METER = 5,
3199    #[doc = "The vertical accuracy is smaller than 1 meter."]
3200    MAV_ODID_VER_ACC_1_METER = 6,
3201}
3202impl MavOdidVerAcc {
3203    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3204}
3205impl Default for MavOdidVerAcc {
3206    fn default() -> Self {
3207        Self::DEFAULT
3208    }
3209}
3210#[cfg_attr(feature = "ts", derive(TS))]
3211#[cfg_attr(feature = "ts", ts(export))]
3212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3214#[cfg_attr(feature = "serde", serde(tag = "type"))]
3215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3216#[repr(u32)]
3217#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3218pub enum MavParamExtType {
3219    #[doc = "8-bit unsigned integer"]
3220    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3221    #[doc = "8-bit signed integer"]
3222    MAV_PARAM_EXT_TYPE_INT8 = 2,
3223    #[doc = "16-bit unsigned integer"]
3224    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3225    #[doc = "16-bit signed integer"]
3226    MAV_PARAM_EXT_TYPE_INT16 = 4,
3227    #[doc = "32-bit unsigned integer"]
3228    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3229    #[doc = "32-bit signed integer"]
3230    MAV_PARAM_EXT_TYPE_INT32 = 6,
3231    #[doc = "64-bit unsigned integer"]
3232    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3233    #[doc = "64-bit signed integer"]
3234    MAV_PARAM_EXT_TYPE_INT64 = 8,
3235    #[doc = "32-bit floating-point"]
3236    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3237    #[doc = "64-bit floating-point"]
3238    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3239    #[doc = "Custom Type"]
3240    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3241}
3242impl MavParamExtType {
3243    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3244}
3245impl Default for MavParamExtType {
3246    fn default() -> Self {
3247        Self::DEFAULT
3248    }
3249}
3250#[cfg_attr(feature = "ts", derive(TS))]
3251#[cfg_attr(feature = "ts", ts(export))]
3252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3254#[cfg_attr(feature = "serde", serde(tag = "type"))]
3255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3256#[repr(u32)]
3257#[doc = "Specifies the datatype of a MAVLink parameter."]
3258pub enum MavParamType {
3259    #[doc = "8-bit unsigned integer"]
3260    MAV_PARAM_TYPE_UINT8 = 1,
3261    #[doc = "8-bit signed integer"]
3262    MAV_PARAM_TYPE_INT8 = 2,
3263    #[doc = "16-bit unsigned integer"]
3264    MAV_PARAM_TYPE_UINT16 = 3,
3265    #[doc = "16-bit signed integer"]
3266    MAV_PARAM_TYPE_INT16 = 4,
3267    #[doc = "32-bit unsigned integer"]
3268    MAV_PARAM_TYPE_UINT32 = 5,
3269    #[doc = "32-bit signed integer"]
3270    MAV_PARAM_TYPE_INT32 = 6,
3271    #[doc = "64-bit unsigned integer"]
3272    MAV_PARAM_TYPE_UINT64 = 7,
3273    #[doc = "64-bit signed integer"]
3274    MAV_PARAM_TYPE_INT64 = 8,
3275    #[doc = "32-bit floating-point"]
3276    MAV_PARAM_TYPE_REAL32 = 9,
3277    #[doc = "64-bit floating-point"]
3278    MAV_PARAM_TYPE_REAL64 = 10,
3279}
3280impl MavParamType {
3281    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3282}
3283impl Default for MavParamType {
3284    fn default() -> Self {
3285        Self::DEFAULT
3286    }
3287}
3288bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3289impl MavPowerStatus {
3290    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3291}
3292impl Default for MavPowerStatus {
3293    fn default() -> Self {
3294        Self::DEFAULT
3295    }
3296}
3297bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3298impl MavProtocolCapability {
3299    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3300}
3301impl Default for MavProtocolCapability {
3302    fn default() -> Self {
3303        Self::DEFAULT
3304    }
3305}
3306#[cfg_attr(feature = "ts", derive(TS))]
3307#[cfg_attr(feature = "ts", ts(export))]
3308#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3310#[cfg_attr(feature = "serde", serde(tag = "type"))]
3311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3312#[repr(u32)]
3313#[doc = "Result from a MAVLink command (MAV_CMD)"]
3314pub enum MavResult {
3315    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3316    MAV_RESULT_ACCEPTED = 0,
3317    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3318    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3319    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3320    MAV_RESULT_DENIED = 2,
3321    #[doc = "Command is not supported (unknown)."]
3322    MAV_RESULT_UNSUPPORTED = 3,
3323    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3324    MAV_RESULT_FAILED = 4,
3325    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3326    MAV_RESULT_IN_PROGRESS = 5,
3327    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3328    MAV_RESULT_CANCELLED = 6,
3329    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3330    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3331    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3332    MAV_RESULT_COMMAND_INT_ONLY = 8,
3333    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3334    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3335}
3336impl MavResult {
3337    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3338}
3339impl Default for MavResult {
3340    fn default() -> Self {
3341        Self::DEFAULT
3342    }
3343}
3344#[cfg_attr(feature = "ts", derive(TS))]
3345#[cfg_attr(feature = "ts", ts(export))]
3346#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3348#[cfg_attr(feature = "serde", serde(tag = "type"))]
3349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3350#[repr(u32)]
3351#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3352#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3353pub enum MavRoi {
3354    #[doc = "No region of interest."]
3355    MAV_ROI_NONE = 0,
3356    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3357    MAV_ROI_WPNEXT = 1,
3358    #[doc = "Point toward given waypoint."]
3359    MAV_ROI_WPINDEX = 2,
3360    #[doc = "Point toward fixed location."]
3361    MAV_ROI_LOCATION = 3,
3362    #[doc = "Point toward of given id."]
3363    MAV_ROI_TARGET = 4,
3364}
3365impl MavRoi {
3366    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3367}
3368impl Default for MavRoi {
3369    fn default() -> Self {
3370        Self::DEFAULT
3371    }
3372}
3373#[cfg_attr(feature = "ts", derive(TS))]
3374#[cfg_attr(feature = "ts", ts(export))]
3375#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3377#[cfg_attr(feature = "serde", serde(tag = "type"))]
3378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3379#[repr(u32)]
3380#[doc = "Enumeration of sensor orientation, according to its rotations"]
3381pub enum MavSensorOrientation {
3382    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3383    MAV_SENSOR_ROTATION_NONE = 0,
3384    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3385    MAV_SENSOR_ROTATION_YAW_45 = 1,
3386    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3387    MAV_SENSOR_ROTATION_YAW_90 = 2,
3388    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3389    MAV_SENSOR_ROTATION_YAW_135 = 3,
3390    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3391    MAV_SENSOR_ROTATION_YAW_180 = 4,
3392    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3393    MAV_SENSOR_ROTATION_YAW_225 = 5,
3394    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3395    MAV_SENSOR_ROTATION_YAW_270 = 6,
3396    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3397    MAV_SENSOR_ROTATION_YAW_315 = 7,
3398    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3399    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3400    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3401    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3402    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3403    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3404    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3405    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3406    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3407    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3408    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3409    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3410    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3411    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3412    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3413    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3414    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3415    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3416    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3417    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3418    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3419    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3420    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3421    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3422    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3423    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3424    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3425    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3426    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3427    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3428    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3429    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3430    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3431    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3432    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3433    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3434    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3435    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3436    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3437    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3438    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3439    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3440    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3441    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3442    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3443    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3444    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3445    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3446    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3447    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3448    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3449    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3450    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3451    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3452    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3453    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3454    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3455    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3456    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3457    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3458    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3459    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3460    #[doc = "Pitch: 315"]
3461    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3462    #[doc = "Roll: 90, Pitch: 315"]
3463    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3464    #[doc = "Custom orientation"]
3465    MAV_SENSOR_ROTATION_CUSTOM = 100,
3466}
3467impl MavSensorOrientation {
3468    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3469}
3470impl Default for MavSensorOrientation {
3471    fn default() -> Self {
3472        Self::DEFAULT
3473    }
3474}
3475#[cfg_attr(feature = "ts", derive(TS))]
3476#[cfg_attr(feature = "ts", ts(export))]
3477#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3478#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3479#[cfg_attr(feature = "serde", serde(tag = "type"))]
3480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3481#[repr(u32)]
3482#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3483pub enum MavSeverity {
3484    #[doc = "System is unusable. This is a \"panic\" condition."]
3485    MAV_SEVERITY_EMERGENCY = 0,
3486    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3487    MAV_SEVERITY_ALERT = 1,
3488    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3489    MAV_SEVERITY_CRITICAL = 2,
3490    #[doc = "Indicates an error in secondary/redundant systems."]
3491    MAV_SEVERITY_ERROR = 3,
3492    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3493    MAV_SEVERITY_WARNING = 4,
3494    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3495    MAV_SEVERITY_NOTICE = 5,
3496    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3497    MAV_SEVERITY_INFO = 6,
3498    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3499    MAV_SEVERITY_DEBUG = 7,
3500}
3501impl MavSeverity {
3502    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3503}
3504impl Default for MavSeverity {
3505    fn default() -> Self {
3506        Self::DEFAULT
3507    }
3508}
3509#[cfg_attr(feature = "ts", derive(TS))]
3510#[cfg_attr(feature = "ts", ts(export))]
3511#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3513#[cfg_attr(feature = "serde", serde(tag = "type"))]
3514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3515#[repr(u32)]
3516#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3517pub enum MavStandardMode {
3518    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3519    MAV_STANDARD_MODE_NON_STANDARD = 0,
3520    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3521    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3522    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3523    MAV_STANDARD_MODE_ORBIT = 2,
3524    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3525    MAV_STANDARD_MODE_CRUISE = 3,
3526    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3527    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3528    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3529    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3530    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3531    MAV_STANDARD_MODE_MISSION = 6,
3532    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3533    MAV_STANDARD_MODE_LAND = 7,
3534    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3535    MAV_STANDARD_MODE_TAKEOFF = 8,
3536}
3537impl MavStandardMode {
3538    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3539}
3540impl Default for MavStandardMode {
3541    fn default() -> Self {
3542        Self::DEFAULT
3543    }
3544}
3545#[cfg_attr(feature = "ts", derive(TS))]
3546#[cfg_attr(feature = "ts", ts(export))]
3547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3549#[cfg_attr(feature = "serde", serde(tag = "type"))]
3550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3551#[repr(u32)]
3552pub enum MavState {
3553    #[doc = "Uninitialized system, state is unknown."]
3554    MAV_STATE_UNINIT = 0,
3555    #[doc = "System is booting up."]
3556    MAV_STATE_BOOT = 1,
3557    #[doc = "System is calibrating and not flight-ready."]
3558    MAV_STATE_CALIBRATING = 2,
3559    #[doc = "System is grounded and on standby. It can be launched any time."]
3560    MAV_STATE_STANDBY = 3,
3561    #[doc = "System is active and might be already airborne. Motors are engaged."]
3562    MAV_STATE_ACTIVE = 4,
3563    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3564    MAV_STATE_CRITICAL = 5,
3565    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3566    MAV_STATE_EMERGENCY = 6,
3567    #[doc = "System just initialized its power-down sequence, will shut down now."]
3568    MAV_STATE_POWEROFF = 7,
3569    #[doc = "System is terminating itself (failsafe or commanded)."]
3570    MAV_STATE_FLIGHT_TERMINATION = 8,
3571}
3572impl MavState {
3573    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3574}
3575impl Default for MavState {
3576    fn default() -> Self {
3577        Self::DEFAULT
3578    }
3579}
3580bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3581impl MavSysStatusSensor {
3582    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3583}
3584impl Default for MavSysStatusSensor {
3585    fn default() -> Self {
3586        Self::DEFAULT
3587    }
3588}
3589bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3590impl MavSysStatusSensorExtended {
3591    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3592}
3593impl Default for MavSysStatusSensorExtended {
3594    fn default() -> Self {
3595        Self::DEFAULT
3596    }
3597}
3598#[cfg_attr(feature = "ts", derive(TS))]
3599#[cfg_attr(feature = "ts", ts(export))]
3600#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3602#[cfg_attr(feature = "serde", serde(tag = "type"))]
3603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3604#[repr(u32)]
3605pub enum MavTunnelPayloadType {
3606    #[doc = "Encoding of payload unknown."]
3607    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3608    #[doc = "Registered for STorM32 gimbal controller."]
3609    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3610    #[doc = "Registered for STorM32 gimbal controller."]
3611    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3612    #[doc = "Registered for STorM32 gimbal controller."]
3613    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3614    #[doc = "Registered for STorM32 gimbal controller."]
3615    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3616    #[doc = "Registered for STorM32 gimbal controller."]
3617    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3618    #[doc = "Registered for STorM32 gimbal controller."]
3619    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3620    #[doc = "Registered for STorM32 gimbal controller."]
3621    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3622    #[doc = "Registered for STorM32 gimbal controller."]
3623    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3624    #[doc = "Registered for STorM32 gimbal controller."]
3625    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3626    #[doc = "Registered for STorM32 gimbal controller."]
3627    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3628    #[doc = "Registered for ModalAI remote OSD protocol."]
3629    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3630    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3631    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3632    #[doc = "Registered for ModalAI vendor use."]
3633    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3634}
3635impl MavTunnelPayloadType {
3636    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3637}
3638impl Default for MavTunnelPayloadType {
3639    fn default() -> Self {
3640        Self::DEFAULT
3641    }
3642}
3643#[cfg_attr(feature = "ts", derive(TS))]
3644#[cfg_attr(feature = "ts", ts(export))]
3645#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3647#[cfg_attr(feature = "serde", serde(tag = "type"))]
3648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3649#[repr(u32)]
3650#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3651pub enum MavType {
3652    #[doc = "Generic micro air vehicle"]
3653    MAV_TYPE_GENERIC = 0,
3654    #[doc = "Fixed wing aircraft."]
3655    MAV_TYPE_FIXED_WING = 1,
3656    #[doc = "Quadrotor"]
3657    MAV_TYPE_QUADROTOR = 2,
3658    #[doc = "Coaxial helicopter"]
3659    MAV_TYPE_COAXIAL = 3,
3660    #[doc = "Normal helicopter with tail rotor."]
3661    MAV_TYPE_HELICOPTER = 4,
3662    #[doc = "Ground installation"]
3663    MAV_TYPE_ANTENNA_TRACKER = 5,
3664    #[doc = "Operator control unit / ground control station"]
3665    MAV_TYPE_GCS = 6,
3666    #[doc = "Airship, controlled"]
3667    MAV_TYPE_AIRSHIP = 7,
3668    #[doc = "Free balloon, uncontrolled"]
3669    MAV_TYPE_FREE_BALLOON = 8,
3670    #[doc = "Rocket"]
3671    MAV_TYPE_ROCKET = 9,
3672    #[doc = "Ground rover"]
3673    MAV_TYPE_GROUND_ROVER = 10,
3674    #[doc = "Surface vessel, boat, ship"]
3675    MAV_TYPE_SURFACE_BOAT = 11,
3676    #[doc = "Submarine"]
3677    MAV_TYPE_SUBMARINE = 12,
3678    #[doc = "Hexarotor"]
3679    MAV_TYPE_HEXAROTOR = 13,
3680    #[doc = "Octorotor"]
3681    MAV_TYPE_OCTOROTOR = 14,
3682    #[doc = "Tricopter"]
3683    MAV_TYPE_TRICOPTER = 15,
3684    #[doc = "Flapping wing"]
3685    MAV_TYPE_FLAPPING_WING = 16,
3686    #[doc = "Kite"]
3687    MAV_TYPE_KITE = 17,
3688    #[doc = "Onboard companion controller"]
3689    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3690    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3691    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3692    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3693    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3694    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3695    MAV_TYPE_VTOL_TILTROTOR = 21,
3696    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3697    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3698    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3699    MAV_TYPE_VTOL_TAILSITTER = 23,
3700    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3701    MAV_TYPE_VTOL_TILTWING = 24,
3702    #[doc = "VTOL reserved 5"]
3703    MAV_TYPE_VTOL_RESERVED5 = 25,
3704    #[doc = "Gimbal"]
3705    MAV_TYPE_GIMBAL = 26,
3706    #[doc = "ADSB system"]
3707    MAV_TYPE_ADSB = 27,
3708    #[doc = "Steerable, nonrigid airfoil"]
3709    MAV_TYPE_PARAFOIL = 28,
3710    #[doc = "Dodecarotor"]
3711    MAV_TYPE_DODECAROTOR = 29,
3712    #[doc = "Camera"]
3713    MAV_TYPE_CAMERA = 30,
3714    #[doc = "Charging station"]
3715    MAV_TYPE_CHARGING_STATION = 31,
3716    #[doc = "FLARM collision avoidance system"]
3717    MAV_TYPE_FLARM = 32,
3718    #[doc = "Servo"]
3719    MAV_TYPE_SERVO = 33,
3720    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3721    MAV_TYPE_ODID = 34,
3722    #[doc = "Decarotor"]
3723    MAV_TYPE_DECAROTOR = 35,
3724    #[doc = "Battery"]
3725    MAV_TYPE_BATTERY = 36,
3726    #[doc = "Parachute"]
3727    MAV_TYPE_PARACHUTE = 37,
3728    #[doc = "Log"]
3729    MAV_TYPE_LOG = 38,
3730    #[doc = "OSD"]
3731    MAV_TYPE_OSD = 39,
3732    #[doc = "IMU"]
3733    MAV_TYPE_IMU = 40,
3734    #[doc = "GPS"]
3735    MAV_TYPE_GPS = 41,
3736    #[doc = "Winch"]
3737    MAV_TYPE_WINCH = 42,
3738    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3739    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3740    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3741    MAV_TYPE_ILLUMINATOR = 44,
3742    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3743    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3744}
3745impl MavType {
3746    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3747}
3748impl Default for MavType {
3749    fn default() -> Self {
3750        Self::DEFAULT
3751    }
3752}
3753#[cfg_attr(feature = "ts", derive(TS))]
3754#[cfg_attr(feature = "ts", ts(export))]
3755#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3757#[cfg_attr(feature = "serde", serde(tag = "type"))]
3758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3759#[repr(u32)]
3760#[doc = "Enumeration of VTOL states"]
3761pub enum MavVtolState {
3762    #[doc = "MAV is not configured as VTOL"]
3763    MAV_VTOL_STATE_UNDEFINED = 0,
3764    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3765    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3766    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3767    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3768    #[doc = "VTOL is in multicopter state"]
3769    MAV_VTOL_STATE_MC = 3,
3770    #[doc = "VTOL is in fixed-wing state"]
3771    MAV_VTOL_STATE_FW = 4,
3772}
3773impl MavVtolState {
3774    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3775}
3776impl Default for MavVtolState {
3777    fn default() -> Self {
3778        Self::DEFAULT
3779    }
3780}
3781bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3782impl MavWinchStatusFlag {
3783    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3784}
3785impl Default for MavWinchStatusFlag {
3786    fn default() -> Self {
3787        Self::DEFAULT
3788    }
3789}
3790#[cfg_attr(feature = "ts", derive(TS))]
3791#[cfg_attr(feature = "ts", ts(export))]
3792#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3794#[cfg_attr(feature = "serde", serde(tag = "type"))]
3795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3796#[repr(u32)]
3797pub enum MavlinkDataStreamType {
3798    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3799    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3800    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3801    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3802    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3803    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3804}
3805impl MavlinkDataStreamType {
3806    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3807}
3808impl Default for MavlinkDataStreamType {
3809    fn default() -> Self {
3810        Self::DEFAULT
3811    }
3812}
3813#[cfg_attr(feature = "ts", derive(TS))]
3814#[cfg_attr(feature = "ts", ts(export))]
3815#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3816#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3817#[cfg_attr(feature = "serde", serde(tag = "type"))]
3818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3819#[repr(u32)]
3820#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3821pub enum MissionState {
3822    #[doc = "The mission status reporting is not supported."]
3823    MISSION_STATE_UNKNOWN = 0,
3824    #[doc = "No mission on the vehicle."]
3825    MISSION_STATE_NO_MISSION = 1,
3826    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3827    MISSION_STATE_NOT_STARTED = 2,
3828    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3829    MISSION_STATE_ACTIVE = 3,
3830    #[doc = "Mission is paused when in auto mode."]
3831    MISSION_STATE_PAUSED = 4,
3832    #[doc = "Mission has executed all mission items."]
3833    MISSION_STATE_COMPLETE = 5,
3834}
3835impl MissionState {
3836    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3837}
3838impl Default for MissionState {
3839    fn default() -> Self {
3840        Self::DEFAULT
3841    }
3842}
3843#[cfg_attr(feature = "ts", derive(TS))]
3844#[cfg_attr(feature = "ts", ts(export))]
3845#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3847#[cfg_attr(feature = "serde", serde(tag = "type"))]
3848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3849#[repr(u32)]
3850#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3851pub enum MotorTestOrder {
3852    #[doc = "Default autopilot motor test method."]
3853    MOTOR_TEST_ORDER_DEFAULT = 0,
3854    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3855    MOTOR_TEST_ORDER_SEQUENCE = 1,
3856    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3857    MOTOR_TEST_ORDER_BOARD = 2,
3858}
3859impl MotorTestOrder {
3860    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3861}
3862impl Default for MotorTestOrder {
3863    fn default() -> Self {
3864        Self::DEFAULT
3865    }
3866}
3867#[cfg_attr(feature = "ts", derive(TS))]
3868#[cfg_attr(feature = "ts", ts(export))]
3869#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3871#[cfg_attr(feature = "serde", serde(tag = "type"))]
3872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3873#[repr(u32)]
3874#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3875pub enum MotorTestThrottleType {
3876    #[doc = "Throttle as a percentage (0 ~ 100)"]
3877    MOTOR_TEST_THROTTLE_PERCENT = 0,
3878    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3879    MOTOR_TEST_THROTTLE_PWM = 1,
3880    #[doc = "Throttle pass-through from pilot's transmitter."]
3881    MOTOR_TEST_THROTTLE_PILOT = 2,
3882    #[doc = "Per-motor compass calibration test."]
3883    MOTOR_TEST_COMPASS_CAL = 3,
3884}
3885impl MotorTestThrottleType {
3886    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3887}
3888impl Default for MotorTestThrottleType {
3889    fn default() -> Self {
3890        Self::DEFAULT
3891    }
3892}
3893#[cfg_attr(feature = "ts", derive(TS))]
3894#[cfg_attr(feature = "ts", ts(export))]
3895#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3897#[cfg_attr(feature = "serde", serde(tag = "type"))]
3898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3899#[repr(u32)]
3900pub enum NavVtolLandOptions {
3901    #[doc = "Default autopilot landing behaviour."]
3902    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3903    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3904    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3905    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3906    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3907}
3908impl NavVtolLandOptions {
3909    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3910}
3911impl Default for NavVtolLandOptions {
3912    fn default() -> Self {
3913        Self::DEFAULT
3914    }
3915}
3916#[cfg_attr(feature = "ts", derive(TS))]
3917#[cfg_attr(feature = "ts", ts(export))]
3918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3920#[cfg_attr(feature = "serde", serde(tag = "type"))]
3921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3922#[repr(u32)]
3923#[doc = "Yaw behaviour during orbit flight."]
3924pub enum OrbitYawBehaviour {
3925    #[doc = "Vehicle front points to the center (default)."]
3926    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3927    #[doc = "Vehicle front holds heading when message received."]
3928    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3929    #[doc = "Yaw uncontrolled."]
3930    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3931    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3932    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3933    #[doc = "Yaw controlled by RC input."]
3934    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3935    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3936    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3937}
3938impl OrbitYawBehaviour {
3939    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3940}
3941impl Default for OrbitYawBehaviour {
3942    fn default() -> Self {
3943        Self::DEFAULT
3944    }
3945}
3946#[cfg_attr(feature = "ts", derive(TS))]
3947#[cfg_attr(feature = "ts", ts(export))]
3948#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3950#[cfg_attr(feature = "serde", serde(tag = "type"))]
3951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3952#[repr(u32)]
3953#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3954pub enum ParachuteAction {
3955    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3956    PARACHUTE_DISABLE = 0,
3957    #[doc = "Enable auto-release of parachute."]
3958    PARACHUTE_ENABLE = 1,
3959    #[doc = "Release parachute and kill motors."]
3960    PARACHUTE_RELEASE = 2,
3961}
3962impl ParachuteAction {
3963    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3964}
3965impl Default for ParachuteAction {
3966    fn default() -> Self {
3967        Self::DEFAULT
3968    }
3969}
3970#[cfg_attr(feature = "ts", derive(TS))]
3971#[cfg_attr(feature = "ts", ts(export))]
3972#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3974#[cfg_attr(feature = "serde", serde(tag = "type"))]
3975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3976#[repr(u32)]
3977#[doc = "Result from PARAM_EXT_SET message."]
3978pub enum ParamAck {
3979    #[doc = "Parameter value ACCEPTED and SET"]
3980    PARAM_ACK_ACCEPTED = 0,
3981    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3982    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3983    #[doc = "Parameter failed to set"]
3984    PARAM_ACK_FAILED = 2,
3985    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3986    PARAM_ACK_IN_PROGRESS = 3,
3987}
3988impl ParamAck {
3989    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3990}
3991impl Default for ParamAck {
3992    fn default() -> Self {
3993        Self::DEFAULT
3994    }
3995}
3996bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3997impl PositionTargetTypemask {
3998    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3999}
4000impl Default for PositionTargetTypemask {
4001    fn default() -> Self {
4002        Self::DEFAULT
4003    }
4004}
4005#[cfg_attr(feature = "ts", derive(TS))]
4006#[cfg_attr(feature = "ts", ts(export))]
4007#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4009#[cfg_attr(feature = "serde", serde(tag = "type"))]
4010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4011#[repr(u32)]
4012#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4013pub enum PrecisionLandMode {
4014    #[doc = "Normal (non-precision) landing."]
4015    PRECISION_LAND_MODE_DISABLED = 0,
4016    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4017    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4018    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4019    PRECISION_LAND_MODE_REQUIRED = 2,
4020}
4021impl PrecisionLandMode {
4022    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4023}
4024impl Default for PrecisionLandMode {
4025    fn default() -> Self {
4026        Self::DEFAULT
4027    }
4028}
4029#[cfg_attr(feature = "ts", derive(TS))]
4030#[cfg_attr(feature = "ts", ts(export))]
4031#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4033#[cfg_attr(feature = "serde", serde(tag = "type"))]
4034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4035#[repr(u32)]
4036#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4037pub enum PreflightStorageMissionAction {
4038    #[doc = "Read current mission data from persistent storage"]
4039    MISSION_READ_PERSISTENT = 0,
4040    #[doc = "Write current mission data to persistent storage"]
4041    MISSION_WRITE_PERSISTENT = 1,
4042    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4043    MISSION_RESET_DEFAULT = 2,
4044}
4045impl PreflightStorageMissionAction {
4046    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4047}
4048impl Default for PreflightStorageMissionAction {
4049    fn default() -> Self {
4050        Self::DEFAULT
4051    }
4052}
4053#[cfg_attr(feature = "ts", derive(TS))]
4054#[cfg_attr(feature = "ts", ts(export))]
4055#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4057#[cfg_attr(feature = "serde", serde(tag = "type"))]
4058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4059#[repr(u32)]
4060#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4061pub enum PreflightStorageParameterAction {
4062    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4063    PARAM_READ_PERSISTENT = 0,
4064    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4065    PARAM_WRITE_PERSISTENT = 1,
4066    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4067    PARAM_RESET_CONFIG_DEFAULT = 2,
4068    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4069    PARAM_RESET_SENSOR_DEFAULT = 3,
4070    #[doc = "Reset all parameters, including operation counters, to default values"]
4071    PARAM_RESET_ALL_DEFAULT = 4,
4072}
4073impl PreflightStorageParameterAction {
4074    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4075}
4076impl Default for PreflightStorageParameterAction {
4077    fn default() -> Self {
4078        Self::DEFAULT
4079    }
4080}
4081#[cfg_attr(feature = "ts", derive(TS))]
4082#[cfg_attr(feature = "ts", ts(export))]
4083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4085#[cfg_attr(feature = "serde", serde(tag = "type"))]
4086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4087#[repr(u32)]
4088#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4089pub enum RcSubType {
4090    #[doc = "Spektrum DSM2"]
4091    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4092    #[doc = "Spektrum DSMX"]
4093    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4094    #[doc = "Spektrum DSMX8"]
4095    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4096}
4097impl RcSubType {
4098    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4099}
4100impl Default for RcSubType {
4101    fn default() -> Self {
4102        Self::DEFAULT
4103    }
4104}
4105#[cfg_attr(feature = "ts", derive(TS))]
4106#[cfg_attr(feature = "ts", ts(export))]
4107#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4109#[cfg_attr(feature = "serde", serde(tag = "type"))]
4110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4111#[repr(u32)]
4112#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4113pub enum RcType {
4114    #[doc = "Spektrum"]
4115    RC_TYPE_SPEKTRUM = 0,
4116    #[doc = "CRSF"]
4117    RC_TYPE_CRSF = 1,
4118}
4119impl RcType {
4120    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4121}
4122impl Default for RcType {
4123    fn default() -> Self {
4124        Self::DEFAULT
4125    }
4126}
4127#[cfg_attr(feature = "ts", derive(TS))]
4128#[cfg_attr(feature = "ts", ts(export))]
4129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4131#[cfg_attr(feature = "serde", serde(tag = "type"))]
4132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4133#[repr(u32)]
4134#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4135pub enum RebootShutdownConditions {
4136    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4137    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4138    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4139    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4140}
4141impl RebootShutdownConditions {
4142    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4143}
4144impl Default for RebootShutdownConditions {
4145    fn default() -> Self {
4146        Self::DEFAULT
4147    }
4148}
4149#[cfg_attr(feature = "ts", derive(TS))]
4150#[cfg_attr(feature = "ts", ts(export))]
4151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4153#[cfg_attr(feature = "serde", serde(tag = "type"))]
4154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4155#[repr(u32)]
4156#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4157pub enum RtkBaselineCoordinateSystem {
4158    #[doc = "Earth-centered, Earth-fixed"]
4159    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4160    #[doc = "RTK basestation centered, north, east, down"]
4161    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4162}
4163impl RtkBaselineCoordinateSystem {
4164    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4165}
4166impl Default for RtkBaselineCoordinateSystem {
4167    fn default() -> Self {
4168        Self::DEFAULT
4169    }
4170}
4171#[cfg_attr(feature = "ts", derive(TS))]
4172#[cfg_attr(feature = "ts", ts(export))]
4173#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4175#[cfg_attr(feature = "serde", serde(tag = "type"))]
4176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4177#[repr(u32)]
4178#[doc = "Possible safety switch states."]
4179pub enum SafetySwitchState {
4180    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4181    SAFETY_SWITCH_STATE_SAFE = 0,
4182    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4183    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4184}
4185impl SafetySwitchState {
4186    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4187}
4188impl Default for SafetySwitchState {
4189    fn default() -> Self {
4190        Self::DEFAULT
4191    }
4192}
4193#[cfg_attr(feature = "ts", derive(TS))]
4194#[cfg_attr(feature = "ts", ts(export))]
4195#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4197#[cfg_attr(feature = "serde", serde(tag = "type"))]
4198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4199#[repr(u32)]
4200#[doc = "SERIAL_CONTROL device types"]
4201pub enum SerialControlDev {
4202    #[doc = "First telemetry port"]
4203    SERIAL_CONTROL_DEV_TELEM1 = 0,
4204    #[doc = "Second telemetry port"]
4205    SERIAL_CONTROL_DEV_TELEM2 = 1,
4206    #[doc = "First GPS port"]
4207    SERIAL_CONTROL_DEV_GPS1 = 2,
4208    #[doc = "Second GPS port"]
4209    SERIAL_CONTROL_DEV_GPS2 = 3,
4210    #[doc = "system shell"]
4211    SERIAL_CONTROL_DEV_SHELL = 10,
4212    #[doc = "SERIAL0"]
4213    SERIAL_CONTROL_SERIAL0 = 100,
4214    #[doc = "SERIAL1"]
4215    SERIAL_CONTROL_SERIAL1 = 101,
4216    #[doc = "SERIAL2"]
4217    SERIAL_CONTROL_SERIAL2 = 102,
4218    #[doc = "SERIAL3"]
4219    SERIAL_CONTROL_SERIAL3 = 103,
4220    #[doc = "SERIAL4"]
4221    SERIAL_CONTROL_SERIAL4 = 104,
4222    #[doc = "SERIAL5"]
4223    SERIAL_CONTROL_SERIAL5 = 105,
4224    #[doc = "SERIAL6"]
4225    SERIAL_CONTROL_SERIAL6 = 106,
4226    #[doc = "SERIAL7"]
4227    SERIAL_CONTROL_SERIAL7 = 107,
4228    #[doc = "SERIAL8"]
4229    SERIAL_CONTROL_SERIAL8 = 108,
4230    #[doc = "SERIAL9"]
4231    SERIAL_CONTROL_SERIAL9 = 109,
4232}
4233impl SerialControlDev {
4234    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4235}
4236impl Default for SerialControlDev {
4237    fn default() -> Self {
4238        Self::DEFAULT
4239    }
4240}
4241bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4242impl SerialControlFlag {
4243    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4244}
4245impl Default for SerialControlFlag {
4246    fn default() -> Self {
4247        Self::DEFAULT
4248    }
4249}
4250#[cfg_attr(feature = "ts", derive(TS))]
4251#[cfg_attr(feature = "ts", ts(export))]
4252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4254#[cfg_attr(feature = "serde", serde(tag = "type"))]
4255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4256#[repr(u32)]
4257#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4258pub enum SetFocusType {
4259    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4260    FOCUS_TYPE_STEP = 0,
4261    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4262    FOCUS_TYPE_CONTINUOUS = 1,
4263    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4264    FOCUS_TYPE_RANGE = 2,
4265    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4266    FOCUS_TYPE_METERS = 3,
4267    #[doc = "Focus automatically."]
4268    FOCUS_TYPE_AUTO = 4,
4269    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4270    FOCUS_TYPE_AUTO_SINGLE = 5,
4271    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4272    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4273}
4274impl SetFocusType {
4275    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4276}
4277impl Default for SetFocusType {
4278    fn default() -> Self {
4279        Self::DEFAULT
4280    }
4281}
4282#[cfg_attr(feature = "ts", derive(TS))]
4283#[cfg_attr(feature = "ts", ts(export))]
4284#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4286#[cfg_attr(feature = "serde", serde(tag = "type"))]
4287#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4288#[repr(u32)]
4289#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4290pub enum SpeedType {
4291    #[doc = "Airspeed"]
4292    SPEED_TYPE_AIRSPEED = 0,
4293    #[doc = "Groundspeed"]
4294    SPEED_TYPE_GROUNDSPEED = 1,
4295    #[doc = "Climb speed"]
4296    SPEED_TYPE_CLIMB_SPEED = 2,
4297    #[doc = "Descent speed"]
4298    SPEED_TYPE_DESCENT_SPEED = 3,
4299}
4300impl SpeedType {
4301    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4302}
4303impl Default for SpeedType {
4304    fn default() -> Self {
4305        Self::DEFAULT
4306    }
4307}
4308#[cfg_attr(feature = "ts", derive(TS))]
4309#[cfg_attr(feature = "ts", ts(export))]
4310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4312#[cfg_attr(feature = "serde", serde(tag = "type"))]
4313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4314#[repr(u32)]
4315#[doc = "Flags to indicate the status of camera storage."]
4316pub enum StorageStatus {
4317    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4318    STORAGE_STATUS_EMPTY = 0,
4319    #[doc = "Storage present but unformatted."]
4320    STORAGE_STATUS_UNFORMATTED = 1,
4321    #[doc = "Storage present and ready."]
4322    STORAGE_STATUS_READY = 2,
4323    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4324    STORAGE_STATUS_NOT_SUPPORTED = 3,
4325}
4326impl StorageStatus {
4327    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4328}
4329impl Default for StorageStatus {
4330    fn default() -> Self {
4331        Self::DEFAULT
4332    }
4333}
4334#[cfg_attr(feature = "ts", derive(TS))]
4335#[cfg_attr(feature = "ts", ts(export))]
4336#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4338#[cfg_attr(feature = "serde", serde(tag = "type"))]
4339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4340#[repr(u32)]
4341#[doc = "Flags to indicate the type of storage."]
4342pub enum StorageType {
4343    #[doc = "Storage type is not known."]
4344    STORAGE_TYPE_UNKNOWN = 0,
4345    #[doc = "Storage type is USB device."]
4346    STORAGE_TYPE_USB_STICK = 1,
4347    #[doc = "Storage type is SD card."]
4348    STORAGE_TYPE_SD = 2,
4349    #[doc = "Storage type is microSD card."]
4350    STORAGE_TYPE_MICROSD = 3,
4351    #[doc = "Storage type is CFast."]
4352    STORAGE_TYPE_CF = 4,
4353    #[doc = "Storage type is CFexpress."]
4354    STORAGE_TYPE_CFE = 5,
4355    #[doc = "Storage type is XQD."]
4356    STORAGE_TYPE_XQD = 6,
4357    #[doc = "Storage type is HD mass storage type."]
4358    STORAGE_TYPE_HD = 7,
4359    #[doc = "Storage type is other, not listed type."]
4360    STORAGE_TYPE_OTHER = 254,
4361}
4362impl StorageType {
4363    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4364}
4365impl Default for StorageType {
4366    fn default() -> Self {
4367        Self::DEFAULT
4368    }
4369}
4370bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4371impl StorageUsageFlag {
4372    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4373}
4374impl Default for StorageUsageFlag {
4375    fn default() -> Self {
4376        Self::DEFAULT
4377    }
4378}
4379#[cfg_attr(feature = "ts", derive(TS))]
4380#[cfg_attr(feature = "ts", ts(export))]
4381#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4383#[cfg_attr(feature = "serde", serde(tag = "type"))]
4384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4385#[repr(u32)]
4386#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4387pub enum TuneFormat {
4388    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4389    TUNE_FORMAT_QBASIC1_1 = 1,
4390    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4391    TUNE_FORMAT_MML_MODERN = 2,
4392}
4393impl TuneFormat {
4394    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4395}
4396impl Default for TuneFormat {
4397    fn default() -> Self {
4398        Self::DEFAULT
4399    }
4400}
4401#[cfg_attr(feature = "ts", derive(TS))]
4402#[cfg_attr(feature = "ts", ts(export))]
4403#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4405#[cfg_attr(feature = "serde", serde(tag = "type"))]
4406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4407#[repr(u32)]
4408#[doc = "Generalized UAVCAN node health"]
4409pub enum UavcanNodeHealth {
4410    #[doc = "The node is functioning properly."]
4411    UAVCAN_NODE_HEALTH_OK = 0,
4412    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4413    UAVCAN_NODE_HEALTH_WARNING = 1,
4414    #[doc = "The node has encountered a major failure."]
4415    UAVCAN_NODE_HEALTH_ERROR = 2,
4416    #[doc = "The node has suffered a fatal malfunction."]
4417    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4418}
4419impl UavcanNodeHealth {
4420    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4421}
4422impl Default for UavcanNodeHealth {
4423    fn default() -> Self {
4424        Self::DEFAULT
4425    }
4426}
4427#[cfg_attr(feature = "ts", derive(TS))]
4428#[cfg_attr(feature = "ts", ts(export))]
4429#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4431#[cfg_attr(feature = "serde", serde(tag = "type"))]
4432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4433#[repr(u32)]
4434#[doc = "Generalized UAVCAN node mode"]
4435pub enum UavcanNodeMode {
4436    #[doc = "The node is performing its primary functions."]
4437    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4438    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4439    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4440    #[doc = "The node is under maintenance."]
4441    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4442    #[doc = "The node is in the process of updating its software."]
4443    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4444    #[doc = "The node is no longer available online."]
4445    UAVCAN_NODE_MODE_OFFLINE = 7,
4446}
4447impl UavcanNodeMode {
4448    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4449}
4450impl Default for UavcanNodeMode {
4451    fn default() -> Self {
4452        Self::DEFAULT
4453    }
4454}
4455bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4456impl UtmDataAvailFlags {
4457    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4458}
4459impl Default for UtmDataAvailFlags {
4460    fn default() -> Self {
4461        Self::DEFAULT
4462    }
4463}
4464#[cfg_attr(feature = "ts", derive(TS))]
4465#[cfg_attr(feature = "ts", ts(export))]
4466#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4467#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4468#[cfg_attr(feature = "serde", serde(tag = "type"))]
4469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4470#[repr(u32)]
4471#[doc = "Airborne status of UAS."]
4472pub enum UtmFlightState {
4473    #[doc = "The flight state can't be determined."]
4474    UTM_FLIGHT_STATE_UNKNOWN = 1,
4475    #[doc = "UAS on ground."]
4476    UTM_FLIGHT_STATE_GROUND = 2,
4477    #[doc = "UAS airborne."]
4478    UTM_FLIGHT_STATE_AIRBORNE = 3,
4479    #[doc = "UAS is in an emergency flight state."]
4480    UTM_FLIGHT_STATE_EMERGENCY = 16,
4481    #[doc = "UAS has no active controls."]
4482    UTM_FLIGHT_STATE_NOCTRL = 32,
4483}
4484impl UtmFlightState {
4485    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4486}
4487impl Default for UtmFlightState {
4488    fn default() -> Self {
4489        Self::DEFAULT
4490    }
4491}
4492#[cfg_attr(feature = "ts", derive(TS))]
4493#[cfg_attr(feature = "ts", ts(export))]
4494#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4496#[cfg_attr(feature = "serde", serde(tag = "type"))]
4497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4498#[repr(u32)]
4499#[doc = "Video stream encodings"]
4500pub enum VideoStreamEncoding {
4501    #[doc = "Stream encoding is unknown"]
4502    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4503    #[doc = "Stream encoding is H.264"]
4504    VIDEO_STREAM_ENCODING_H264 = 1,
4505    #[doc = "Stream encoding is H.265"]
4506    VIDEO_STREAM_ENCODING_H265 = 2,
4507}
4508impl VideoStreamEncoding {
4509    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4510}
4511impl Default for VideoStreamEncoding {
4512    fn default() -> Self {
4513        Self::DEFAULT
4514    }
4515}
4516bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4517impl VideoStreamStatusFlags {
4518    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4519}
4520impl Default for VideoStreamStatusFlags {
4521    fn default() -> Self {
4522        Self::DEFAULT
4523    }
4524}
4525#[cfg_attr(feature = "ts", derive(TS))]
4526#[cfg_attr(feature = "ts", ts(export))]
4527#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4529#[cfg_attr(feature = "serde", serde(tag = "type"))]
4530#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4531#[repr(u32)]
4532#[doc = "Video stream types"]
4533pub enum VideoStreamType {
4534    #[doc = "Stream is RTSP"]
4535    VIDEO_STREAM_TYPE_RTSP = 0,
4536    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4537    VIDEO_STREAM_TYPE_RTPUDP = 1,
4538    #[doc = "Stream is MPEG on TCP"]
4539    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4540    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4541    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4542}
4543impl VideoStreamType {
4544    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4545}
4546impl Default for VideoStreamType {
4547    fn default() -> Self {
4548        Self::DEFAULT
4549    }
4550}
4551#[cfg_attr(feature = "ts", derive(TS))]
4552#[cfg_attr(feature = "ts", ts(export))]
4553#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4555#[cfg_attr(feature = "serde", serde(tag = "type"))]
4556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4557#[repr(u32)]
4558#[doc = "Direction of VTOL transition"]
4559pub enum VtolTransitionHeading {
4560    #[doc = "Respect the heading configuration of the vehicle."]
4561    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4562    #[doc = "Use the heading pointing towards the next waypoint."]
4563    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4564    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4565    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4566    #[doc = "Use the specified heading in parameter 4."]
4567    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4568    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4569    VTOL_TRANSITION_HEADING_ANY = 4,
4570}
4571impl VtolTransitionHeading {
4572    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4573}
4574impl Default for VtolTransitionHeading {
4575    fn default() -> Self {
4576        Self::DEFAULT
4577    }
4578}
4579#[cfg_attr(feature = "ts", derive(TS))]
4580#[cfg_attr(feature = "ts", ts(export))]
4581#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4582#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4583#[cfg_attr(feature = "serde", serde(tag = "type"))]
4584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4585#[repr(u32)]
4586#[doc = "WiFi Mode."]
4587pub enum WifiConfigApMode {
4588    #[doc = "WiFi mode is undefined."]
4589    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4590    #[doc = "WiFi configured as an access point."]
4591    WIFI_CONFIG_AP_MODE_AP = 1,
4592    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4593    WIFI_CONFIG_AP_MODE_STATION = 2,
4594    #[doc = "WiFi disabled."]
4595    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4596}
4597impl WifiConfigApMode {
4598    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4599}
4600impl Default for WifiConfigApMode {
4601    fn default() -> Self {
4602        Self::DEFAULT
4603    }
4604}
4605#[cfg_attr(feature = "ts", derive(TS))]
4606#[cfg_attr(feature = "ts", ts(export))]
4607#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4609#[cfg_attr(feature = "serde", serde(tag = "type"))]
4610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4611#[repr(u32)]
4612#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4613pub enum WifiConfigApResponse {
4614    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4615    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4616    #[doc = "Changes accepted."]
4617    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4618    #[doc = "Changes rejected."]
4619    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4620    #[doc = "Invalid Mode."]
4621    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4622    #[doc = "Invalid SSID."]
4623    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4624    #[doc = "Invalid Password."]
4625    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4626}
4627impl WifiConfigApResponse {
4628    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4629}
4630impl Default for WifiConfigApResponse {
4631    fn default() -> Self {
4632        Self::DEFAULT
4633    }
4634}
4635#[cfg_attr(feature = "ts", derive(TS))]
4636#[cfg_attr(feature = "ts", ts(export))]
4637#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4639#[cfg_attr(feature = "serde", serde(tag = "type"))]
4640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4641#[repr(u32)]
4642#[doc = "Winch actions."]
4643pub enum WinchActions {
4644    #[doc = "Allow motor to freewheel."]
4645    WINCH_RELAXED = 0,
4646    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4647    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4648    #[doc = "Wind or unwind line at specified rate."]
4649    WINCH_RATE_CONTROL = 2,
4650    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4651    WINCH_LOCK = 3,
4652    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4653    WINCH_DELIVER = 4,
4654    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4655    WINCH_HOLD = 5,
4656    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4657    WINCH_RETRACT = 6,
4658    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4659    WINCH_LOAD_LINE = 7,
4660    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4661    WINCH_ABANDON_LINE = 8,
4662    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4663    WINCH_LOAD_PAYLOAD = 9,
4664}
4665impl WinchActions {
4666    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4667}
4668impl Default for WinchActions {
4669    fn default() -> Self {
4670        Self::DEFAULT
4671    }
4672}
4673#[doc = "Set the vehicle attitude and body angular rates."]
4674#[doc = ""]
4675#[doc = "ID: 140"]
4676#[derive(Debug, Clone, PartialEq)]
4677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4679#[cfg_attr(feature = "ts", derive(TS))]
4680#[cfg_attr(feature = "ts", ts(export))]
4681pub struct ACTUATOR_CONTROL_TARGET_DATA {
4682    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4683    pub time_usec: u64,
4684    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4685    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4686    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4687    pub controls: [f32; 8],
4688    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4689    pub group_mlx: u8,
4690}
4691impl ACTUATOR_CONTROL_TARGET_DATA {
4692    pub const ENCODED_LEN: usize = 41usize;
4693    pub const DEFAULT: Self = Self {
4694        time_usec: 0_u64,
4695        controls: [0.0_f32; 8usize],
4696        group_mlx: 0_u8,
4697    };
4698    #[cfg(feature = "arbitrary")]
4699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4700        use arbitrary::{Arbitrary, Unstructured};
4701        let mut buf = [0u8; 1024];
4702        rng.fill_bytes(&mut buf);
4703        let mut unstructured = Unstructured::new(&buf);
4704        Self::arbitrary(&mut unstructured).unwrap_or_default()
4705    }
4706}
4707impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4708    fn default() -> Self {
4709        Self::DEFAULT.clone()
4710    }
4711}
4712impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4713    type Message = MavMessage;
4714    const ID: u32 = 140u32;
4715    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4716    const EXTRA_CRC: u8 = 181u8;
4717    const ENCODED_LEN: usize = 41usize;
4718    fn deser(
4719        _version: MavlinkVersion,
4720        __input: &[u8],
4721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4722        let avail_len = __input.len();
4723        let mut payload_buf = [0; Self::ENCODED_LEN];
4724        let mut buf = if avail_len < Self::ENCODED_LEN {
4725            payload_buf[0..avail_len].copy_from_slice(__input);
4726            Bytes::new(&payload_buf)
4727        } else {
4728            Bytes::new(__input)
4729        };
4730        let mut __struct = Self::default();
4731        __struct.time_usec = buf.get_u64_le();
4732        for v in &mut __struct.controls {
4733            let val = buf.get_f32_le();
4734            *v = val;
4735        }
4736        __struct.group_mlx = buf.get_u8();
4737        Ok(__struct)
4738    }
4739    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4740        let mut __tmp = BytesMut::new(bytes);
4741        #[allow(clippy::absurd_extreme_comparisons)]
4742        #[allow(unused_comparisons)]
4743        if __tmp.remaining() < Self::ENCODED_LEN {
4744            panic!(
4745                "buffer is too small (need {} bytes, but got {})",
4746                Self::ENCODED_LEN,
4747                __tmp.remaining(),
4748            )
4749        }
4750        __tmp.put_u64_le(self.time_usec);
4751        for val in &self.controls {
4752            __tmp.put_f32_le(*val);
4753        }
4754        __tmp.put_u8(self.group_mlx);
4755        if matches!(version, MavlinkVersion::V2) {
4756            let len = __tmp.len();
4757            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4758        } else {
4759            __tmp.len()
4760        }
4761    }
4762}
4763#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4764#[doc = ""]
4765#[doc = "ID: 375"]
4766#[derive(Debug, Clone, PartialEq)]
4767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4769#[cfg_attr(feature = "ts", derive(TS))]
4770#[cfg_attr(feature = "ts", ts(export))]
4771pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4772    #[doc = "Timestamp (since system boot)."]
4773    pub time_usec: u64,
4774    #[doc = "Active outputs"]
4775    pub active: u32,
4776    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4777    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4778    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4779    pub actuator: [f32; 32],
4780}
4781impl ACTUATOR_OUTPUT_STATUS_DATA {
4782    pub const ENCODED_LEN: usize = 140usize;
4783    pub const DEFAULT: Self = Self {
4784        time_usec: 0_u64,
4785        active: 0_u32,
4786        actuator: [0.0_f32; 32usize],
4787    };
4788    #[cfg(feature = "arbitrary")]
4789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4790        use arbitrary::{Arbitrary, Unstructured};
4791        let mut buf = [0u8; 1024];
4792        rng.fill_bytes(&mut buf);
4793        let mut unstructured = Unstructured::new(&buf);
4794        Self::arbitrary(&mut unstructured).unwrap_or_default()
4795    }
4796}
4797impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4798    fn default() -> Self {
4799        Self::DEFAULT.clone()
4800    }
4801}
4802impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4803    type Message = MavMessage;
4804    const ID: u32 = 375u32;
4805    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4806    const EXTRA_CRC: u8 = 251u8;
4807    const ENCODED_LEN: usize = 140usize;
4808    fn deser(
4809        _version: MavlinkVersion,
4810        __input: &[u8],
4811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4812        let avail_len = __input.len();
4813        let mut payload_buf = [0; Self::ENCODED_LEN];
4814        let mut buf = if avail_len < Self::ENCODED_LEN {
4815            payload_buf[0..avail_len].copy_from_slice(__input);
4816            Bytes::new(&payload_buf)
4817        } else {
4818            Bytes::new(__input)
4819        };
4820        let mut __struct = Self::default();
4821        __struct.time_usec = buf.get_u64_le();
4822        __struct.active = buf.get_u32_le();
4823        for v in &mut __struct.actuator {
4824            let val = buf.get_f32_le();
4825            *v = val;
4826        }
4827        Ok(__struct)
4828    }
4829    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4830        let mut __tmp = BytesMut::new(bytes);
4831        #[allow(clippy::absurd_extreme_comparisons)]
4832        #[allow(unused_comparisons)]
4833        if __tmp.remaining() < Self::ENCODED_LEN {
4834            panic!(
4835                "buffer is too small (need {} bytes, but got {})",
4836                Self::ENCODED_LEN,
4837                __tmp.remaining(),
4838            )
4839        }
4840        __tmp.put_u64_le(self.time_usec);
4841        __tmp.put_u32_le(self.active);
4842        for val in &self.actuator {
4843            __tmp.put_f32_le(*val);
4844        }
4845        if matches!(version, MavlinkVersion::V2) {
4846            let len = __tmp.len();
4847            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4848        } else {
4849            __tmp.len()
4850        }
4851    }
4852}
4853#[doc = "The location and information of an ADSB vehicle."]
4854#[doc = ""]
4855#[doc = "ID: 246"]
4856#[derive(Debug, Clone, PartialEq)]
4857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4859#[cfg_attr(feature = "ts", derive(TS))]
4860#[cfg_attr(feature = "ts", ts(export))]
4861pub struct ADSB_VEHICLE_DATA {
4862    #[doc = "ICAO address"]
4863    pub ICAO_address: u32,
4864    #[doc = "Latitude"]
4865    pub lat: i32,
4866    #[doc = "Longitude"]
4867    pub lon: i32,
4868    #[doc = "Altitude(ASL)"]
4869    pub altitude: i32,
4870    #[doc = "Course over ground"]
4871    pub heading: u16,
4872    #[doc = "The horizontal velocity"]
4873    pub hor_velocity: u16,
4874    #[doc = "The vertical velocity. Positive is up"]
4875    pub ver_velocity: i16,
4876    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4877    pub flags: AdsbFlags,
4878    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4879    pub squawk: u16,
4880    #[doc = "ADSB altitude type."]
4881    pub altitude_type: AdsbAltitudeType,
4882    #[doc = "The callsign, 8+null"]
4883    #[cfg_attr(
4884        feature = "serde",
4885        serde(
4886            serialize_with = "crate::nulstr::serialize::<_, 9>",
4887            deserialize_with = "crate::nulstr::deserialize::<_, 9>"
4888        )
4889    )]
4890    #[cfg_attr(feature = "ts", ts(type = "string"))]
4891    pub callsign: [u8; 9],
4892    #[doc = "ADSB emitter type."]
4893    pub emitter_type: AdsbEmitterType,
4894    #[doc = "Time since last communication in seconds"]
4895    pub tslc: u8,
4896}
4897impl ADSB_VEHICLE_DATA {
4898    pub const ENCODED_LEN: usize = 38usize;
4899    pub const DEFAULT: Self = Self {
4900        ICAO_address: 0_u32,
4901        lat: 0_i32,
4902        lon: 0_i32,
4903        altitude: 0_i32,
4904        heading: 0_u16,
4905        hor_velocity: 0_u16,
4906        ver_velocity: 0_i16,
4907        flags: AdsbFlags::DEFAULT,
4908        squawk: 0_u16,
4909        altitude_type: AdsbAltitudeType::DEFAULT,
4910        callsign: [0_u8; 9usize],
4911        emitter_type: AdsbEmitterType::DEFAULT,
4912        tslc: 0_u8,
4913    };
4914    #[cfg(feature = "arbitrary")]
4915    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4916        use arbitrary::{Arbitrary, Unstructured};
4917        let mut buf = [0u8; 1024];
4918        rng.fill_bytes(&mut buf);
4919        let mut unstructured = Unstructured::new(&buf);
4920        Self::arbitrary(&mut unstructured).unwrap_or_default()
4921    }
4922}
4923impl Default for ADSB_VEHICLE_DATA {
4924    fn default() -> Self {
4925        Self::DEFAULT.clone()
4926    }
4927}
4928impl MessageData for ADSB_VEHICLE_DATA {
4929    type Message = MavMessage;
4930    const ID: u32 = 246u32;
4931    const NAME: &'static str = "ADSB_VEHICLE";
4932    const EXTRA_CRC: u8 = 184u8;
4933    const ENCODED_LEN: usize = 38usize;
4934    fn deser(
4935        _version: MavlinkVersion,
4936        __input: &[u8],
4937    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4938        let avail_len = __input.len();
4939        let mut payload_buf = [0; Self::ENCODED_LEN];
4940        let mut buf = if avail_len < Self::ENCODED_LEN {
4941            payload_buf[0..avail_len].copy_from_slice(__input);
4942            Bytes::new(&payload_buf)
4943        } else {
4944            Bytes::new(__input)
4945        };
4946        let mut __struct = Self::default();
4947        __struct.ICAO_address = buf.get_u32_le();
4948        __struct.lat = buf.get_i32_le();
4949        __struct.lon = buf.get_i32_le();
4950        __struct.altitude = buf.get_i32_le();
4951        __struct.heading = buf.get_u16_le();
4952        __struct.hor_velocity = buf.get_u16_le();
4953        __struct.ver_velocity = buf.get_i16_le();
4954        let tmp = buf.get_u16_le();
4955        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
4956            ::mavlink_core::error::ParserError::InvalidFlag {
4957                flag_type: "AdsbFlags",
4958                value: tmp as u32,
4959            },
4960        )?;
4961        __struct.squawk = buf.get_u16_le();
4962        let tmp = buf.get_u8();
4963        __struct.altitude_type =
4964            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4965                enum_type: "AdsbAltitudeType",
4966                value: tmp as u32,
4967            })?;
4968        for v in &mut __struct.callsign {
4969            let val = buf.get_u8();
4970            *v = val;
4971        }
4972        let tmp = buf.get_u8();
4973        __struct.emitter_type =
4974            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4975                enum_type: "AdsbEmitterType",
4976                value: tmp as u32,
4977            })?;
4978        __struct.tslc = buf.get_u8();
4979        Ok(__struct)
4980    }
4981    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4982        let mut __tmp = BytesMut::new(bytes);
4983        #[allow(clippy::absurd_extreme_comparisons)]
4984        #[allow(unused_comparisons)]
4985        if __tmp.remaining() < Self::ENCODED_LEN {
4986            panic!(
4987                "buffer is too small (need {} bytes, but got {})",
4988                Self::ENCODED_LEN,
4989                __tmp.remaining(),
4990            )
4991        }
4992        __tmp.put_u32_le(self.ICAO_address);
4993        __tmp.put_i32_le(self.lat);
4994        __tmp.put_i32_le(self.lon);
4995        __tmp.put_i32_le(self.altitude);
4996        __tmp.put_u16_le(self.heading);
4997        __tmp.put_u16_le(self.hor_velocity);
4998        __tmp.put_i16_le(self.ver_velocity);
4999        __tmp.put_u16_le(self.flags.bits());
5000        __tmp.put_u16_le(self.squawk);
5001        __tmp.put_u8(self.altitude_type as u8);
5002        for val in &self.callsign {
5003            __tmp.put_u8(*val);
5004        }
5005        __tmp.put_u8(self.emitter_type as u8);
5006        __tmp.put_u8(self.tslc);
5007        if matches!(version, MavlinkVersion::V2) {
5008            let len = __tmp.len();
5009            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5010        } else {
5011            __tmp.len()
5012        }
5013    }
5014}
5015#[doc = "The location and information of an AIS vessel."]
5016#[doc = ""]
5017#[doc = "ID: 301"]
5018#[derive(Debug, Clone, PartialEq)]
5019#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5020#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5021#[cfg_attr(feature = "ts", derive(TS))]
5022#[cfg_attr(feature = "ts", ts(export))]
5023pub struct AIS_VESSEL_DATA {
5024    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5025    pub MMSI: u32,
5026    #[doc = "Latitude"]
5027    pub lat: i32,
5028    #[doc = "Longitude"]
5029    pub lon: i32,
5030    #[doc = "Course over ground"]
5031    pub COG: u16,
5032    #[doc = "True heading"]
5033    pub heading: u16,
5034    #[doc = "Speed over ground"]
5035    pub velocity: u16,
5036    #[doc = "Distance from lat/lon location to bow"]
5037    pub dimension_bow: u16,
5038    #[doc = "Distance from lat/lon location to stern"]
5039    pub dimension_stern: u16,
5040    #[doc = "Time since last communication in seconds"]
5041    pub tslc: u16,
5042    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5043    pub flags: AisFlags,
5044    #[doc = "Turn rate"]
5045    pub turn_rate: i8,
5046    #[doc = "Navigational status"]
5047    pub navigational_status: AisNavStatus,
5048    #[doc = "Type of vessels"]
5049    pub mavtype: AisType,
5050    #[doc = "Distance from lat/lon location to port side"]
5051    pub dimension_port: u8,
5052    #[doc = "Distance from lat/lon location to starboard side"]
5053    pub dimension_starboard: u8,
5054    #[doc = "The vessel callsign"]
5055    #[cfg_attr(
5056        feature = "serde",
5057        serde(
5058            serialize_with = "crate::nulstr::serialize::<_, 7>",
5059            deserialize_with = "crate::nulstr::deserialize::<_, 7>"
5060        )
5061    )]
5062    #[cfg_attr(feature = "ts", ts(type = "string"))]
5063    pub callsign: [u8; 7],
5064    #[doc = "The vessel name"]
5065    #[cfg_attr(
5066        feature = "serde",
5067        serde(
5068            serialize_with = "crate::nulstr::serialize::<_, 20>",
5069            deserialize_with = "crate::nulstr::deserialize::<_, 20>"
5070        )
5071    )]
5072    #[cfg_attr(feature = "ts", ts(type = "string"))]
5073    pub name: [u8; 20],
5074}
5075impl AIS_VESSEL_DATA {
5076    pub const ENCODED_LEN: usize = 58usize;
5077    pub const DEFAULT: Self = Self {
5078        MMSI: 0_u32,
5079        lat: 0_i32,
5080        lon: 0_i32,
5081        COG: 0_u16,
5082        heading: 0_u16,
5083        velocity: 0_u16,
5084        dimension_bow: 0_u16,
5085        dimension_stern: 0_u16,
5086        tslc: 0_u16,
5087        flags: AisFlags::DEFAULT,
5088        turn_rate: 0_i8,
5089        navigational_status: AisNavStatus::DEFAULT,
5090        mavtype: AisType::DEFAULT,
5091        dimension_port: 0_u8,
5092        dimension_starboard: 0_u8,
5093        callsign: [0_u8; 7usize],
5094        name: [0_u8; 20usize],
5095    };
5096    #[cfg(feature = "arbitrary")]
5097    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5098        use arbitrary::{Arbitrary, Unstructured};
5099        let mut buf = [0u8; 1024];
5100        rng.fill_bytes(&mut buf);
5101        let mut unstructured = Unstructured::new(&buf);
5102        Self::arbitrary(&mut unstructured).unwrap_or_default()
5103    }
5104}
5105impl Default for AIS_VESSEL_DATA {
5106    fn default() -> Self {
5107        Self::DEFAULT.clone()
5108    }
5109}
5110impl MessageData for AIS_VESSEL_DATA {
5111    type Message = MavMessage;
5112    const ID: u32 = 301u32;
5113    const NAME: &'static str = "AIS_VESSEL";
5114    const EXTRA_CRC: u8 = 243u8;
5115    const ENCODED_LEN: usize = 58usize;
5116    fn deser(
5117        _version: MavlinkVersion,
5118        __input: &[u8],
5119    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5120        let avail_len = __input.len();
5121        let mut payload_buf = [0; Self::ENCODED_LEN];
5122        let mut buf = if avail_len < Self::ENCODED_LEN {
5123            payload_buf[0..avail_len].copy_from_slice(__input);
5124            Bytes::new(&payload_buf)
5125        } else {
5126            Bytes::new(__input)
5127        };
5128        let mut __struct = Self::default();
5129        __struct.MMSI = buf.get_u32_le();
5130        __struct.lat = buf.get_i32_le();
5131        __struct.lon = buf.get_i32_le();
5132        __struct.COG = buf.get_u16_le();
5133        __struct.heading = buf.get_u16_le();
5134        __struct.velocity = buf.get_u16_le();
5135        __struct.dimension_bow = buf.get_u16_le();
5136        __struct.dimension_stern = buf.get_u16_le();
5137        __struct.tslc = buf.get_u16_le();
5138        let tmp = buf.get_u16_le();
5139        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5140            ::mavlink_core::error::ParserError::InvalidFlag {
5141                flag_type: "AisFlags",
5142                value: tmp as u32,
5143            },
5144        )?;
5145        __struct.turn_rate = buf.get_i8();
5146        let tmp = buf.get_u8();
5147        __struct.navigational_status =
5148            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5149                enum_type: "AisNavStatus",
5150                value: tmp as u32,
5151            })?;
5152        let tmp = buf.get_u8();
5153        __struct.mavtype =
5154            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5155                enum_type: "AisType",
5156                value: tmp as u32,
5157            })?;
5158        __struct.dimension_port = buf.get_u8();
5159        __struct.dimension_starboard = buf.get_u8();
5160        for v in &mut __struct.callsign {
5161            let val = buf.get_u8();
5162            *v = val;
5163        }
5164        for v in &mut __struct.name {
5165            let val = buf.get_u8();
5166            *v = val;
5167        }
5168        Ok(__struct)
5169    }
5170    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5171        let mut __tmp = BytesMut::new(bytes);
5172        #[allow(clippy::absurd_extreme_comparisons)]
5173        #[allow(unused_comparisons)]
5174        if __tmp.remaining() < Self::ENCODED_LEN {
5175            panic!(
5176                "buffer is too small (need {} bytes, but got {})",
5177                Self::ENCODED_LEN,
5178                __tmp.remaining(),
5179            )
5180        }
5181        __tmp.put_u32_le(self.MMSI);
5182        __tmp.put_i32_le(self.lat);
5183        __tmp.put_i32_le(self.lon);
5184        __tmp.put_u16_le(self.COG);
5185        __tmp.put_u16_le(self.heading);
5186        __tmp.put_u16_le(self.velocity);
5187        __tmp.put_u16_le(self.dimension_bow);
5188        __tmp.put_u16_le(self.dimension_stern);
5189        __tmp.put_u16_le(self.tslc);
5190        __tmp.put_u16_le(self.flags.bits());
5191        __tmp.put_i8(self.turn_rate);
5192        __tmp.put_u8(self.navigational_status as u8);
5193        __tmp.put_u8(self.mavtype as u8);
5194        __tmp.put_u8(self.dimension_port);
5195        __tmp.put_u8(self.dimension_starboard);
5196        for val in &self.callsign {
5197            __tmp.put_u8(*val);
5198        }
5199        for val in &self.name {
5200            __tmp.put_u8(*val);
5201        }
5202        if matches!(version, MavlinkVersion::V2) {
5203            let len = __tmp.len();
5204            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5205        } else {
5206            __tmp.len()
5207        }
5208    }
5209}
5210#[doc = "The current system altitude."]
5211#[doc = ""]
5212#[doc = "ID: 141"]
5213#[derive(Debug, Clone, PartialEq)]
5214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5216#[cfg_attr(feature = "ts", derive(TS))]
5217#[cfg_attr(feature = "ts", ts(export))]
5218pub struct ALTITUDE_DATA {
5219    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5220    pub time_usec: u64,
5221    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5222    pub altitude_monotonic: f32,
5223    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5224    pub altitude_amsl: f32,
5225    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5226    pub altitude_local: f32,
5227    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5228    pub altitude_relative: f32,
5229    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5230    pub altitude_terrain: f32,
5231    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5232    pub bottom_clearance: f32,
5233}
5234impl ALTITUDE_DATA {
5235    pub const ENCODED_LEN: usize = 32usize;
5236    pub const DEFAULT: Self = Self {
5237        time_usec: 0_u64,
5238        altitude_monotonic: 0.0_f32,
5239        altitude_amsl: 0.0_f32,
5240        altitude_local: 0.0_f32,
5241        altitude_relative: 0.0_f32,
5242        altitude_terrain: 0.0_f32,
5243        bottom_clearance: 0.0_f32,
5244    };
5245    #[cfg(feature = "arbitrary")]
5246    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5247        use arbitrary::{Arbitrary, Unstructured};
5248        let mut buf = [0u8; 1024];
5249        rng.fill_bytes(&mut buf);
5250        let mut unstructured = Unstructured::new(&buf);
5251        Self::arbitrary(&mut unstructured).unwrap_or_default()
5252    }
5253}
5254impl Default for ALTITUDE_DATA {
5255    fn default() -> Self {
5256        Self::DEFAULT.clone()
5257    }
5258}
5259impl MessageData for ALTITUDE_DATA {
5260    type Message = MavMessage;
5261    const ID: u32 = 141u32;
5262    const NAME: &'static str = "ALTITUDE";
5263    const EXTRA_CRC: u8 = 47u8;
5264    const ENCODED_LEN: usize = 32usize;
5265    fn deser(
5266        _version: MavlinkVersion,
5267        __input: &[u8],
5268    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5269        let avail_len = __input.len();
5270        let mut payload_buf = [0; Self::ENCODED_LEN];
5271        let mut buf = if avail_len < Self::ENCODED_LEN {
5272            payload_buf[0..avail_len].copy_from_slice(__input);
5273            Bytes::new(&payload_buf)
5274        } else {
5275            Bytes::new(__input)
5276        };
5277        let mut __struct = Self::default();
5278        __struct.time_usec = buf.get_u64_le();
5279        __struct.altitude_monotonic = buf.get_f32_le();
5280        __struct.altitude_amsl = buf.get_f32_le();
5281        __struct.altitude_local = buf.get_f32_le();
5282        __struct.altitude_relative = buf.get_f32_le();
5283        __struct.altitude_terrain = buf.get_f32_le();
5284        __struct.bottom_clearance = buf.get_f32_le();
5285        Ok(__struct)
5286    }
5287    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5288        let mut __tmp = BytesMut::new(bytes);
5289        #[allow(clippy::absurd_extreme_comparisons)]
5290        #[allow(unused_comparisons)]
5291        if __tmp.remaining() < Self::ENCODED_LEN {
5292            panic!(
5293                "buffer is too small (need {} bytes, but got {})",
5294                Self::ENCODED_LEN,
5295                __tmp.remaining(),
5296            )
5297        }
5298        __tmp.put_u64_le(self.time_usec);
5299        __tmp.put_f32_le(self.altitude_monotonic);
5300        __tmp.put_f32_le(self.altitude_amsl);
5301        __tmp.put_f32_le(self.altitude_local);
5302        __tmp.put_f32_le(self.altitude_relative);
5303        __tmp.put_f32_le(self.altitude_terrain);
5304        __tmp.put_f32_le(self.bottom_clearance);
5305        if matches!(version, MavlinkVersion::V2) {
5306            let len = __tmp.len();
5307            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5308        } else {
5309            __tmp.len()
5310        }
5311    }
5312}
5313#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5314#[doc = ""]
5315#[doc = "ID: 30"]
5316#[derive(Debug, Clone, PartialEq)]
5317#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5319#[cfg_attr(feature = "ts", derive(TS))]
5320#[cfg_attr(feature = "ts", ts(export))]
5321pub struct ATTITUDE_DATA {
5322    #[doc = "Timestamp (time since system boot)."]
5323    pub time_boot_ms: u32,
5324    #[doc = "Roll angle (-pi..+pi)"]
5325    pub roll: f32,
5326    #[doc = "Pitch angle (-pi..+pi)"]
5327    pub pitch: f32,
5328    #[doc = "Yaw angle (-pi..+pi)"]
5329    pub yaw: f32,
5330    #[doc = "Roll angular speed"]
5331    pub rollspeed: f32,
5332    #[doc = "Pitch angular speed"]
5333    pub pitchspeed: f32,
5334    #[doc = "Yaw angular speed"]
5335    pub yawspeed: f32,
5336}
5337impl ATTITUDE_DATA {
5338    pub const ENCODED_LEN: usize = 28usize;
5339    pub const DEFAULT: Self = Self {
5340        time_boot_ms: 0_u32,
5341        roll: 0.0_f32,
5342        pitch: 0.0_f32,
5343        yaw: 0.0_f32,
5344        rollspeed: 0.0_f32,
5345        pitchspeed: 0.0_f32,
5346        yawspeed: 0.0_f32,
5347    };
5348    #[cfg(feature = "arbitrary")]
5349    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5350        use arbitrary::{Arbitrary, Unstructured};
5351        let mut buf = [0u8; 1024];
5352        rng.fill_bytes(&mut buf);
5353        let mut unstructured = Unstructured::new(&buf);
5354        Self::arbitrary(&mut unstructured).unwrap_or_default()
5355    }
5356}
5357impl Default for ATTITUDE_DATA {
5358    fn default() -> Self {
5359        Self::DEFAULT.clone()
5360    }
5361}
5362impl MessageData for ATTITUDE_DATA {
5363    type Message = MavMessage;
5364    const ID: u32 = 30u32;
5365    const NAME: &'static str = "ATTITUDE";
5366    const EXTRA_CRC: u8 = 39u8;
5367    const ENCODED_LEN: usize = 28usize;
5368    fn deser(
5369        _version: MavlinkVersion,
5370        __input: &[u8],
5371    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5372        let avail_len = __input.len();
5373        let mut payload_buf = [0; Self::ENCODED_LEN];
5374        let mut buf = if avail_len < Self::ENCODED_LEN {
5375            payload_buf[0..avail_len].copy_from_slice(__input);
5376            Bytes::new(&payload_buf)
5377        } else {
5378            Bytes::new(__input)
5379        };
5380        let mut __struct = Self::default();
5381        __struct.time_boot_ms = buf.get_u32_le();
5382        __struct.roll = buf.get_f32_le();
5383        __struct.pitch = buf.get_f32_le();
5384        __struct.yaw = buf.get_f32_le();
5385        __struct.rollspeed = buf.get_f32_le();
5386        __struct.pitchspeed = buf.get_f32_le();
5387        __struct.yawspeed = buf.get_f32_le();
5388        Ok(__struct)
5389    }
5390    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5391        let mut __tmp = BytesMut::new(bytes);
5392        #[allow(clippy::absurd_extreme_comparisons)]
5393        #[allow(unused_comparisons)]
5394        if __tmp.remaining() < Self::ENCODED_LEN {
5395            panic!(
5396                "buffer is too small (need {} bytes, but got {})",
5397                Self::ENCODED_LEN,
5398                __tmp.remaining(),
5399            )
5400        }
5401        __tmp.put_u32_le(self.time_boot_ms);
5402        __tmp.put_f32_le(self.roll);
5403        __tmp.put_f32_le(self.pitch);
5404        __tmp.put_f32_le(self.yaw);
5405        __tmp.put_f32_le(self.rollspeed);
5406        __tmp.put_f32_le(self.pitchspeed);
5407        __tmp.put_f32_le(self.yawspeed);
5408        if matches!(version, MavlinkVersion::V2) {
5409            let len = __tmp.len();
5410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5411        } else {
5412            __tmp.len()
5413        }
5414    }
5415}
5416#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5417#[doc = ""]
5418#[doc = "ID: 31"]
5419#[derive(Debug, Clone, PartialEq)]
5420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5422#[cfg_attr(feature = "ts", derive(TS))]
5423#[cfg_attr(feature = "ts", ts(export))]
5424pub struct ATTITUDE_QUATERNION_DATA {
5425    #[doc = "Timestamp (time since system boot)."]
5426    pub time_boot_ms: u32,
5427    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5428    pub q1: f32,
5429    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5430    pub q2: f32,
5431    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5432    pub q3: f32,
5433    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5434    pub q4: f32,
5435    #[doc = "Roll angular speed"]
5436    pub rollspeed: f32,
5437    #[doc = "Pitch angular speed"]
5438    pub pitchspeed: f32,
5439    #[doc = "Yaw angular speed"]
5440    pub yawspeed: f32,
5441    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5442    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5443    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5444    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5445    pub repr_offset_q: [f32; 4],
5446}
5447impl ATTITUDE_QUATERNION_DATA {
5448    pub const ENCODED_LEN: usize = 48usize;
5449    pub const DEFAULT: Self = Self {
5450        time_boot_ms: 0_u32,
5451        q1: 0.0_f32,
5452        q2: 0.0_f32,
5453        q3: 0.0_f32,
5454        q4: 0.0_f32,
5455        rollspeed: 0.0_f32,
5456        pitchspeed: 0.0_f32,
5457        yawspeed: 0.0_f32,
5458        repr_offset_q: [0.0_f32; 4usize],
5459    };
5460    #[cfg(feature = "arbitrary")]
5461    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5462        use arbitrary::{Arbitrary, Unstructured};
5463        let mut buf = [0u8; 1024];
5464        rng.fill_bytes(&mut buf);
5465        let mut unstructured = Unstructured::new(&buf);
5466        Self::arbitrary(&mut unstructured).unwrap_or_default()
5467    }
5468}
5469impl Default for ATTITUDE_QUATERNION_DATA {
5470    fn default() -> Self {
5471        Self::DEFAULT.clone()
5472    }
5473}
5474impl MessageData for ATTITUDE_QUATERNION_DATA {
5475    type Message = MavMessage;
5476    const ID: u32 = 31u32;
5477    const NAME: &'static str = "ATTITUDE_QUATERNION";
5478    const EXTRA_CRC: u8 = 246u8;
5479    const ENCODED_LEN: usize = 48usize;
5480    fn deser(
5481        _version: MavlinkVersion,
5482        __input: &[u8],
5483    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5484        let avail_len = __input.len();
5485        let mut payload_buf = [0; Self::ENCODED_LEN];
5486        let mut buf = if avail_len < Self::ENCODED_LEN {
5487            payload_buf[0..avail_len].copy_from_slice(__input);
5488            Bytes::new(&payload_buf)
5489        } else {
5490            Bytes::new(__input)
5491        };
5492        let mut __struct = Self::default();
5493        __struct.time_boot_ms = buf.get_u32_le();
5494        __struct.q1 = buf.get_f32_le();
5495        __struct.q2 = buf.get_f32_le();
5496        __struct.q3 = buf.get_f32_le();
5497        __struct.q4 = buf.get_f32_le();
5498        __struct.rollspeed = buf.get_f32_le();
5499        __struct.pitchspeed = buf.get_f32_le();
5500        __struct.yawspeed = buf.get_f32_le();
5501        for v in &mut __struct.repr_offset_q {
5502            let val = buf.get_f32_le();
5503            *v = val;
5504        }
5505        Ok(__struct)
5506    }
5507    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5508        let mut __tmp = BytesMut::new(bytes);
5509        #[allow(clippy::absurd_extreme_comparisons)]
5510        #[allow(unused_comparisons)]
5511        if __tmp.remaining() < Self::ENCODED_LEN {
5512            panic!(
5513                "buffer is too small (need {} bytes, but got {})",
5514                Self::ENCODED_LEN,
5515                __tmp.remaining(),
5516            )
5517        }
5518        __tmp.put_u32_le(self.time_boot_ms);
5519        __tmp.put_f32_le(self.q1);
5520        __tmp.put_f32_le(self.q2);
5521        __tmp.put_f32_le(self.q3);
5522        __tmp.put_f32_le(self.q4);
5523        __tmp.put_f32_le(self.rollspeed);
5524        __tmp.put_f32_le(self.pitchspeed);
5525        __tmp.put_f32_le(self.yawspeed);
5526        if matches!(version, MavlinkVersion::V2) {
5527            for val in &self.repr_offset_q {
5528                __tmp.put_f32_le(*val);
5529            }
5530            let len = __tmp.len();
5531            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5532        } else {
5533            __tmp.len()
5534        }
5535    }
5536}
5537#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5538#[doc = ""]
5539#[doc = "ID: 61"]
5540#[derive(Debug, Clone, PartialEq)]
5541#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5542#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5543#[cfg_attr(feature = "ts", derive(TS))]
5544#[cfg_attr(feature = "ts", ts(export))]
5545pub struct ATTITUDE_QUATERNION_COV_DATA {
5546    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5547    pub time_usec: u64,
5548    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5549    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5550    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5551    pub q: [f32; 4],
5552    #[doc = "Roll angular speed"]
5553    pub rollspeed: f32,
5554    #[doc = "Pitch angular speed"]
5555    pub pitchspeed: f32,
5556    #[doc = "Yaw angular speed"]
5557    pub yawspeed: f32,
5558    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5559    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5560    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5561    pub covariance: [f32; 9],
5562}
5563impl ATTITUDE_QUATERNION_COV_DATA {
5564    pub const ENCODED_LEN: usize = 72usize;
5565    pub const DEFAULT: Self = Self {
5566        time_usec: 0_u64,
5567        q: [0.0_f32; 4usize],
5568        rollspeed: 0.0_f32,
5569        pitchspeed: 0.0_f32,
5570        yawspeed: 0.0_f32,
5571        covariance: [0.0_f32; 9usize],
5572    };
5573    #[cfg(feature = "arbitrary")]
5574    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5575        use arbitrary::{Arbitrary, Unstructured};
5576        let mut buf = [0u8; 1024];
5577        rng.fill_bytes(&mut buf);
5578        let mut unstructured = Unstructured::new(&buf);
5579        Self::arbitrary(&mut unstructured).unwrap_or_default()
5580    }
5581}
5582impl Default for ATTITUDE_QUATERNION_COV_DATA {
5583    fn default() -> Self {
5584        Self::DEFAULT.clone()
5585    }
5586}
5587impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5588    type Message = MavMessage;
5589    const ID: u32 = 61u32;
5590    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5591    const EXTRA_CRC: u8 = 167u8;
5592    const ENCODED_LEN: usize = 72usize;
5593    fn deser(
5594        _version: MavlinkVersion,
5595        __input: &[u8],
5596    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5597        let avail_len = __input.len();
5598        let mut payload_buf = [0; Self::ENCODED_LEN];
5599        let mut buf = if avail_len < Self::ENCODED_LEN {
5600            payload_buf[0..avail_len].copy_from_slice(__input);
5601            Bytes::new(&payload_buf)
5602        } else {
5603            Bytes::new(__input)
5604        };
5605        let mut __struct = Self::default();
5606        __struct.time_usec = buf.get_u64_le();
5607        for v in &mut __struct.q {
5608            let val = buf.get_f32_le();
5609            *v = val;
5610        }
5611        __struct.rollspeed = buf.get_f32_le();
5612        __struct.pitchspeed = buf.get_f32_le();
5613        __struct.yawspeed = buf.get_f32_le();
5614        for v in &mut __struct.covariance {
5615            let val = buf.get_f32_le();
5616            *v = val;
5617        }
5618        Ok(__struct)
5619    }
5620    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5621        let mut __tmp = BytesMut::new(bytes);
5622        #[allow(clippy::absurd_extreme_comparisons)]
5623        #[allow(unused_comparisons)]
5624        if __tmp.remaining() < Self::ENCODED_LEN {
5625            panic!(
5626                "buffer is too small (need {} bytes, but got {})",
5627                Self::ENCODED_LEN,
5628                __tmp.remaining(),
5629            )
5630        }
5631        __tmp.put_u64_le(self.time_usec);
5632        for val in &self.q {
5633            __tmp.put_f32_le(*val);
5634        }
5635        __tmp.put_f32_le(self.rollspeed);
5636        __tmp.put_f32_le(self.pitchspeed);
5637        __tmp.put_f32_le(self.yawspeed);
5638        for val in &self.covariance {
5639            __tmp.put_f32_le(*val);
5640        }
5641        if matches!(version, MavlinkVersion::V2) {
5642            let len = __tmp.len();
5643            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5644        } else {
5645            __tmp.len()
5646        }
5647    }
5648}
5649#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5650#[doc = ""]
5651#[doc = "ID: 83"]
5652#[derive(Debug, Clone, PartialEq)]
5653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5654#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5655#[cfg_attr(feature = "ts", derive(TS))]
5656#[cfg_attr(feature = "ts", ts(export))]
5657pub struct ATTITUDE_TARGET_DATA {
5658    #[doc = "Timestamp (time since system boot)."]
5659    pub time_boot_ms: u32,
5660    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5661    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5662    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5663    pub q: [f32; 4],
5664    #[doc = "Body roll rate"]
5665    pub body_roll_rate: f32,
5666    #[doc = "Body pitch rate"]
5667    pub body_pitch_rate: f32,
5668    #[doc = "Body yaw rate"]
5669    pub body_yaw_rate: f32,
5670    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5671    pub thrust: f32,
5672    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5673    pub type_mask: AttitudeTargetTypemask,
5674}
5675impl ATTITUDE_TARGET_DATA {
5676    pub const ENCODED_LEN: usize = 37usize;
5677    pub const DEFAULT: Self = Self {
5678        time_boot_ms: 0_u32,
5679        q: [0.0_f32; 4usize],
5680        body_roll_rate: 0.0_f32,
5681        body_pitch_rate: 0.0_f32,
5682        body_yaw_rate: 0.0_f32,
5683        thrust: 0.0_f32,
5684        type_mask: AttitudeTargetTypemask::DEFAULT,
5685    };
5686    #[cfg(feature = "arbitrary")]
5687    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5688        use arbitrary::{Arbitrary, Unstructured};
5689        let mut buf = [0u8; 1024];
5690        rng.fill_bytes(&mut buf);
5691        let mut unstructured = Unstructured::new(&buf);
5692        Self::arbitrary(&mut unstructured).unwrap_or_default()
5693    }
5694}
5695impl Default for ATTITUDE_TARGET_DATA {
5696    fn default() -> Self {
5697        Self::DEFAULT.clone()
5698    }
5699}
5700impl MessageData for ATTITUDE_TARGET_DATA {
5701    type Message = MavMessage;
5702    const ID: u32 = 83u32;
5703    const NAME: &'static str = "ATTITUDE_TARGET";
5704    const EXTRA_CRC: u8 = 22u8;
5705    const ENCODED_LEN: usize = 37usize;
5706    fn deser(
5707        _version: MavlinkVersion,
5708        __input: &[u8],
5709    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5710        let avail_len = __input.len();
5711        let mut payload_buf = [0; Self::ENCODED_LEN];
5712        let mut buf = if avail_len < Self::ENCODED_LEN {
5713            payload_buf[0..avail_len].copy_from_slice(__input);
5714            Bytes::new(&payload_buf)
5715        } else {
5716            Bytes::new(__input)
5717        };
5718        let mut __struct = Self::default();
5719        __struct.time_boot_ms = buf.get_u32_le();
5720        for v in &mut __struct.q {
5721            let val = buf.get_f32_le();
5722            *v = val;
5723        }
5724        __struct.body_roll_rate = buf.get_f32_le();
5725        __struct.body_pitch_rate = buf.get_f32_le();
5726        __struct.body_yaw_rate = buf.get_f32_le();
5727        __struct.thrust = buf.get_f32_le();
5728        let tmp = buf.get_u8();
5729        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5730            tmp & AttitudeTargetTypemask::all().bits(),
5731        )
5732        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5733            flag_type: "AttitudeTargetTypemask",
5734            value: tmp as u32,
5735        })?;
5736        Ok(__struct)
5737    }
5738    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5739        let mut __tmp = BytesMut::new(bytes);
5740        #[allow(clippy::absurd_extreme_comparisons)]
5741        #[allow(unused_comparisons)]
5742        if __tmp.remaining() < Self::ENCODED_LEN {
5743            panic!(
5744                "buffer is too small (need {} bytes, but got {})",
5745                Self::ENCODED_LEN,
5746                __tmp.remaining(),
5747            )
5748        }
5749        __tmp.put_u32_le(self.time_boot_ms);
5750        for val in &self.q {
5751            __tmp.put_f32_le(*val);
5752        }
5753        __tmp.put_f32_le(self.body_roll_rate);
5754        __tmp.put_f32_le(self.body_pitch_rate);
5755        __tmp.put_f32_le(self.body_yaw_rate);
5756        __tmp.put_f32_le(self.thrust);
5757        __tmp.put_u8(self.type_mask.bits());
5758        if matches!(version, MavlinkVersion::V2) {
5759            let len = __tmp.len();
5760            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5761        } else {
5762            __tmp.len()
5763        }
5764    }
5765}
5766#[doc = "Motion capture attitude and position."]
5767#[doc = ""]
5768#[doc = "ID: 138"]
5769#[derive(Debug, Clone, PartialEq)]
5770#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5771#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5772#[cfg_attr(feature = "ts", derive(TS))]
5773#[cfg_attr(feature = "ts", ts(export))]
5774pub struct ATT_POS_MOCAP_DATA {
5775    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5776    pub time_usec: u64,
5777    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5778    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5779    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5780    pub q: [f32; 4],
5781    #[doc = "X position (NED)"]
5782    pub x: f32,
5783    #[doc = "Y position (NED)"]
5784    pub y: f32,
5785    #[doc = "Z position (NED)"]
5786    pub z: f32,
5787    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5788    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5789    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5790    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5791    pub covariance: [f32; 21],
5792}
5793impl ATT_POS_MOCAP_DATA {
5794    pub const ENCODED_LEN: usize = 120usize;
5795    pub const DEFAULT: Self = Self {
5796        time_usec: 0_u64,
5797        q: [0.0_f32; 4usize],
5798        x: 0.0_f32,
5799        y: 0.0_f32,
5800        z: 0.0_f32,
5801        covariance: [0.0_f32; 21usize],
5802    };
5803    #[cfg(feature = "arbitrary")]
5804    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5805        use arbitrary::{Arbitrary, Unstructured};
5806        let mut buf = [0u8; 1024];
5807        rng.fill_bytes(&mut buf);
5808        let mut unstructured = Unstructured::new(&buf);
5809        Self::arbitrary(&mut unstructured).unwrap_or_default()
5810    }
5811}
5812impl Default for ATT_POS_MOCAP_DATA {
5813    fn default() -> Self {
5814        Self::DEFAULT.clone()
5815    }
5816}
5817impl MessageData for ATT_POS_MOCAP_DATA {
5818    type Message = MavMessage;
5819    const ID: u32 = 138u32;
5820    const NAME: &'static str = "ATT_POS_MOCAP";
5821    const EXTRA_CRC: u8 = 109u8;
5822    const ENCODED_LEN: usize = 120usize;
5823    fn deser(
5824        _version: MavlinkVersion,
5825        __input: &[u8],
5826    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5827        let avail_len = __input.len();
5828        let mut payload_buf = [0; Self::ENCODED_LEN];
5829        let mut buf = if avail_len < Self::ENCODED_LEN {
5830            payload_buf[0..avail_len].copy_from_slice(__input);
5831            Bytes::new(&payload_buf)
5832        } else {
5833            Bytes::new(__input)
5834        };
5835        let mut __struct = Self::default();
5836        __struct.time_usec = buf.get_u64_le();
5837        for v in &mut __struct.q {
5838            let val = buf.get_f32_le();
5839            *v = val;
5840        }
5841        __struct.x = buf.get_f32_le();
5842        __struct.y = buf.get_f32_le();
5843        __struct.z = buf.get_f32_le();
5844        for v in &mut __struct.covariance {
5845            let val = buf.get_f32_le();
5846            *v = val;
5847        }
5848        Ok(__struct)
5849    }
5850    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5851        let mut __tmp = BytesMut::new(bytes);
5852        #[allow(clippy::absurd_extreme_comparisons)]
5853        #[allow(unused_comparisons)]
5854        if __tmp.remaining() < Self::ENCODED_LEN {
5855            panic!(
5856                "buffer is too small (need {} bytes, but got {})",
5857                Self::ENCODED_LEN,
5858                __tmp.remaining(),
5859            )
5860        }
5861        __tmp.put_u64_le(self.time_usec);
5862        for val in &self.q {
5863            __tmp.put_f32_le(*val);
5864        }
5865        __tmp.put_f32_le(self.x);
5866        __tmp.put_f32_le(self.y);
5867        __tmp.put_f32_le(self.z);
5868        if matches!(version, MavlinkVersion::V2) {
5869            for val in &self.covariance {
5870                __tmp.put_f32_le(*val);
5871            }
5872            let len = __tmp.len();
5873            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5874        } else {
5875            __tmp.len()
5876        }
5877    }
5878}
5879#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5880#[doc = ""]
5881#[doc = "ID: 7"]
5882#[derive(Debug, Clone, PartialEq)]
5883#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5884#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5885#[cfg_attr(feature = "ts", derive(TS))]
5886#[cfg_attr(feature = "ts", ts(export))]
5887pub struct AUTH_KEY_DATA {
5888    #[doc = "key"]
5889    #[cfg_attr(
5890        feature = "serde",
5891        serde(
5892            serialize_with = "crate::nulstr::serialize::<_, 32>",
5893            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
5894        )
5895    )]
5896    #[cfg_attr(feature = "ts", ts(type = "string"))]
5897    pub key: [u8; 32],
5898}
5899impl AUTH_KEY_DATA {
5900    pub const ENCODED_LEN: usize = 32usize;
5901    pub const DEFAULT: Self = Self {
5902        key: [0_u8; 32usize],
5903    };
5904    #[cfg(feature = "arbitrary")]
5905    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5906        use arbitrary::{Arbitrary, Unstructured};
5907        let mut buf = [0u8; 1024];
5908        rng.fill_bytes(&mut buf);
5909        let mut unstructured = Unstructured::new(&buf);
5910        Self::arbitrary(&mut unstructured).unwrap_or_default()
5911    }
5912}
5913impl Default for AUTH_KEY_DATA {
5914    fn default() -> Self {
5915        Self::DEFAULT.clone()
5916    }
5917}
5918impl MessageData for AUTH_KEY_DATA {
5919    type Message = MavMessage;
5920    const ID: u32 = 7u32;
5921    const NAME: &'static str = "AUTH_KEY";
5922    const EXTRA_CRC: u8 = 119u8;
5923    const ENCODED_LEN: usize = 32usize;
5924    fn deser(
5925        _version: MavlinkVersion,
5926        __input: &[u8],
5927    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5928        let avail_len = __input.len();
5929        let mut payload_buf = [0; Self::ENCODED_LEN];
5930        let mut buf = if avail_len < Self::ENCODED_LEN {
5931            payload_buf[0..avail_len].copy_from_slice(__input);
5932            Bytes::new(&payload_buf)
5933        } else {
5934            Bytes::new(__input)
5935        };
5936        let mut __struct = Self::default();
5937        for v in &mut __struct.key {
5938            let val = buf.get_u8();
5939            *v = val;
5940        }
5941        Ok(__struct)
5942    }
5943    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5944        let mut __tmp = BytesMut::new(bytes);
5945        #[allow(clippy::absurd_extreme_comparisons)]
5946        #[allow(unused_comparisons)]
5947        if __tmp.remaining() < Self::ENCODED_LEN {
5948            panic!(
5949                "buffer is too small (need {} bytes, but got {})",
5950                Self::ENCODED_LEN,
5951                __tmp.remaining(),
5952            )
5953        }
5954        for val in &self.key {
5955            __tmp.put_u8(*val);
5956        }
5957        if matches!(version, MavlinkVersion::V2) {
5958            let len = __tmp.len();
5959            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5960        } else {
5961            __tmp.len()
5962        }
5963    }
5964}
5965#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5966#[doc = ""]
5967#[doc = "ID: 286"]
5968#[derive(Debug, Clone, PartialEq)]
5969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5971#[cfg_attr(feature = "ts", derive(TS))]
5972#[cfg_attr(feature = "ts", ts(export))]
5973pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5974    #[doc = "Timestamp (time since system boot)."]
5975    pub time_boot_us: u64,
5976    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5977    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5978    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5979    pub q: [f32; 4],
5980    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5981    pub q_estimated_delay_us: u32,
5982    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5983    pub vx: f32,
5984    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5985    pub vy: f32,
5986    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5987    pub vz: f32,
5988    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5989    pub v_estimated_delay_us: u32,
5990    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5991    pub feed_forward_angular_velocity_z: f32,
5992    #[doc = "Bitmap indicating which estimator outputs are valid."]
5993    pub estimator_status: EstimatorStatusFlags,
5994    #[doc = "System ID"]
5995    pub target_system: u8,
5996    #[doc = "Component ID"]
5997    pub target_component: u8,
5998    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
5999    pub landed_state: MavLandedState,
6000    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6001    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6002    pub angular_velocity_z: f32,
6003}
6004impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6005    pub const ENCODED_LEN: usize = 57usize;
6006    pub const DEFAULT: Self = Self {
6007        time_boot_us: 0_u64,
6008        q: [0.0_f32; 4usize],
6009        q_estimated_delay_us: 0_u32,
6010        vx: 0.0_f32,
6011        vy: 0.0_f32,
6012        vz: 0.0_f32,
6013        v_estimated_delay_us: 0_u32,
6014        feed_forward_angular_velocity_z: 0.0_f32,
6015        estimator_status: EstimatorStatusFlags::DEFAULT,
6016        target_system: 0_u8,
6017        target_component: 0_u8,
6018        landed_state: MavLandedState::DEFAULT,
6019        angular_velocity_z: 0.0_f32,
6020    };
6021    #[cfg(feature = "arbitrary")]
6022    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6023        use arbitrary::{Arbitrary, Unstructured};
6024        let mut buf = [0u8; 1024];
6025        rng.fill_bytes(&mut buf);
6026        let mut unstructured = Unstructured::new(&buf);
6027        Self::arbitrary(&mut unstructured).unwrap_or_default()
6028    }
6029}
6030impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6031    fn default() -> Self {
6032        Self::DEFAULT.clone()
6033    }
6034}
6035impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6036    type Message = MavMessage;
6037    const ID: u32 = 286u32;
6038    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6039    const EXTRA_CRC: u8 = 210u8;
6040    const ENCODED_LEN: usize = 57usize;
6041    fn deser(
6042        _version: MavlinkVersion,
6043        __input: &[u8],
6044    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6045        let avail_len = __input.len();
6046        let mut payload_buf = [0; Self::ENCODED_LEN];
6047        let mut buf = if avail_len < Self::ENCODED_LEN {
6048            payload_buf[0..avail_len].copy_from_slice(__input);
6049            Bytes::new(&payload_buf)
6050        } else {
6051            Bytes::new(__input)
6052        };
6053        let mut __struct = Self::default();
6054        __struct.time_boot_us = buf.get_u64_le();
6055        for v in &mut __struct.q {
6056            let val = buf.get_f32_le();
6057            *v = val;
6058        }
6059        __struct.q_estimated_delay_us = buf.get_u32_le();
6060        __struct.vx = buf.get_f32_le();
6061        __struct.vy = buf.get_f32_le();
6062        __struct.vz = buf.get_f32_le();
6063        __struct.v_estimated_delay_us = buf.get_u32_le();
6064        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6065        let tmp = buf.get_u16_le();
6066        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6067            tmp & EstimatorStatusFlags::all().bits(),
6068        )
6069        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6070            flag_type: "EstimatorStatusFlags",
6071            value: tmp as u32,
6072        })?;
6073        __struct.target_system = buf.get_u8();
6074        __struct.target_component = buf.get_u8();
6075        let tmp = buf.get_u8();
6076        __struct.landed_state =
6077            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6078                enum_type: "MavLandedState",
6079                value: tmp as u32,
6080            })?;
6081        __struct.angular_velocity_z = buf.get_f32_le();
6082        Ok(__struct)
6083    }
6084    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6085        let mut __tmp = BytesMut::new(bytes);
6086        #[allow(clippy::absurd_extreme_comparisons)]
6087        #[allow(unused_comparisons)]
6088        if __tmp.remaining() < Self::ENCODED_LEN {
6089            panic!(
6090                "buffer is too small (need {} bytes, but got {})",
6091                Self::ENCODED_LEN,
6092                __tmp.remaining(),
6093            )
6094        }
6095        __tmp.put_u64_le(self.time_boot_us);
6096        for val in &self.q {
6097            __tmp.put_f32_le(*val);
6098        }
6099        __tmp.put_u32_le(self.q_estimated_delay_us);
6100        __tmp.put_f32_le(self.vx);
6101        __tmp.put_f32_le(self.vy);
6102        __tmp.put_f32_le(self.vz);
6103        __tmp.put_u32_le(self.v_estimated_delay_us);
6104        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6105        __tmp.put_u16_le(self.estimator_status.bits());
6106        __tmp.put_u8(self.target_system);
6107        __tmp.put_u8(self.target_component);
6108        __tmp.put_u8(self.landed_state as u8);
6109        if matches!(version, MavlinkVersion::V2) {
6110            __tmp.put_f32_le(self.angular_velocity_z);
6111            let len = __tmp.len();
6112            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6113        } else {
6114            __tmp.len()
6115        }
6116    }
6117}
6118#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6119#[doc = ""]
6120#[doc = "ID: 148"]
6121#[derive(Debug, Clone, PartialEq)]
6122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6123#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6124#[cfg_attr(feature = "ts", derive(TS))]
6125#[cfg_attr(feature = "ts", ts(export))]
6126pub struct AUTOPILOT_VERSION_DATA {
6127    #[doc = "Bitmap of capabilities"]
6128    pub capabilities: MavProtocolCapability,
6129    #[doc = "UID if provided by hardware (see uid2)"]
6130    pub uid: u64,
6131    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6132    pub flight_sw_version: u32,
6133    #[doc = "Middleware version number"]
6134    pub middleware_sw_version: u32,
6135    #[doc = "Operating system version number"]
6136    pub os_sw_version: u32,
6137    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6138    pub board_version: u32,
6139    #[doc = "ID of the board vendor"]
6140    pub vendor_id: u16,
6141    #[doc = "ID of the product"]
6142    pub product_id: u16,
6143    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6144    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6145    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6146    pub flight_custom_version: [u8; 8],
6147    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6148    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6149    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6150    pub middleware_custom_version: [u8; 8],
6151    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6152    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6153    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6154    pub os_custom_version: [u8; 8],
6155    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6156    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6157    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6158    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6159    pub uid2: [u8; 18],
6160}
6161impl AUTOPILOT_VERSION_DATA {
6162    pub const ENCODED_LEN: usize = 78usize;
6163    pub const DEFAULT: Self = Self {
6164        capabilities: MavProtocolCapability::DEFAULT,
6165        uid: 0_u64,
6166        flight_sw_version: 0_u32,
6167        middleware_sw_version: 0_u32,
6168        os_sw_version: 0_u32,
6169        board_version: 0_u32,
6170        vendor_id: 0_u16,
6171        product_id: 0_u16,
6172        flight_custom_version: [0_u8; 8usize],
6173        middleware_custom_version: [0_u8; 8usize],
6174        os_custom_version: [0_u8; 8usize],
6175        uid2: [0_u8; 18usize],
6176    };
6177    #[cfg(feature = "arbitrary")]
6178    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6179        use arbitrary::{Arbitrary, Unstructured};
6180        let mut buf = [0u8; 1024];
6181        rng.fill_bytes(&mut buf);
6182        let mut unstructured = Unstructured::new(&buf);
6183        Self::arbitrary(&mut unstructured).unwrap_or_default()
6184    }
6185}
6186impl Default for AUTOPILOT_VERSION_DATA {
6187    fn default() -> Self {
6188        Self::DEFAULT.clone()
6189    }
6190}
6191impl MessageData for AUTOPILOT_VERSION_DATA {
6192    type Message = MavMessage;
6193    const ID: u32 = 148u32;
6194    const NAME: &'static str = "AUTOPILOT_VERSION";
6195    const EXTRA_CRC: u8 = 178u8;
6196    const ENCODED_LEN: usize = 78usize;
6197    fn deser(
6198        _version: MavlinkVersion,
6199        __input: &[u8],
6200    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6201        let avail_len = __input.len();
6202        let mut payload_buf = [0; Self::ENCODED_LEN];
6203        let mut buf = if avail_len < Self::ENCODED_LEN {
6204            payload_buf[0..avail_len].copy_from_slice(__input);
6205            Bytes::new(&payload_buf)
6206        } else {
6207            Bytes::new(__input)
6208        };
6209        let mut __struct = Self::default();
6210        let tmp = buf.get_u64_le();
6211        __struct.capabilities = MavProtocolCapability::from_bits(
6212            tmp & MavProtocolCapability::all().bits(),
6213        )
6214        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6215            flag_type: "MavProtocolCapability",
6216            value: tmp as u32,
6217        })?;
6218        __struct.uid = buf.get_u64_le();
6219        __struct.flight_sw_version = buf.get_u32_le();
6220        __struct.middleware_sw_version = buf.get_u32_le();
6221        __struct.os_sw_version = buf.get_u32_le();
6222        __struct.board_version = buf.get_u32_le();
6223        __struct.vendor_id = buf.get_u16_le();
6224        __struct.product_id = buf.get_u16_le();
6225        for v in &mut __struct.flight_custom_version {
6226            let val = buf.get_u8();
6227            *v = val;
6228        }
6229        for v in &mut __struct.middleware_custom_version {
6230            let val = buf.get_u8();
6231            *v = val;
6232        }
6233        for v in &mut __struct.os_custom_version {
6234            let val = buf.get_u8();
6235            *v = val;
6236        }
6237        for v in &mut __struct.uid2 {
6238            let val = buf.get_u8();
6239            *v = val;
6240        }
6241        Ok(__struct)
6242    }
6243    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6244        let mut __tmp = BytesMut::new(bytes);
6245        #[allow(clippy::absurd_extreme_comparisons)]
6246        #[allow(unused_comparisons)]
6247        if __tmp.remaining() < Self::ENCODED_LEN {
6248            panic!(
6249                "buffer is too small (need {} bytes, but got {})",
6250                Self::ENCODED_LEN,
6251                __tmp.remaining(),
6252            )
6253        }
6254        __tmp.put_u64_le(self.capabilities.bits());
6255        __tmp.put_u64_le(self.uid);
6256        __tmp.put_u32_le(self.flight_sw_version);
6257        __tmp.put_u32_le(self.middleware_sw_version);
6258        __tmp.put_u32_le(self.os_sw_version);
6259        __tmp.put_u32_le(self.board_version);
6260        __tmp.put_u16_le(self.vendor_id);
6261        __tmp.put_u16_le(self.product_id);
6262        for val in &self.flight_custom_version {
6263            __tmp.put_u8(*val);
6264        }
6265        for val in &self.middleware_custom_version {
6266            __tmp.put_u8(*val);
6267        }
6268        for val in &self.os_custom_version {
6269            __tmp.put_u8(*val);
6270        }
6271        if matches!(version, MavlinkVersion::V2) {
6272            for val in &self.uid2 {
6273                __tmp.put_u8(*val);
6274            }
6275            let len = __tmp.len();
6276            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6277        } else {
6278            __tmp.len()
6279        }
6280    }
6281}
6282#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6283#[doc = ""]
6284#[doc = "ID: 435"]
6285#[derive(Debug, Clone, PartialEq)]
6286#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6287#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6288#[cfg_attr(feature = "ts", derive(TS))]
6289#[cfg_attr(feature = "ts", ts(export))]
6290pub struct AVAILABLE_MODES_DATA {
6291    #[doc = "A bitfield for use for autopilot-specific flags"]
6292    pub custom_mode: u32,
6293    #[doc = "Mode properties."]
6294    pub properties: MavModeProperty,
6295    #[doc = "The total number of available modes for the current vehicle type."]
6296    pub number_modes: u8,
6297    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6298    pub mode_index: u8,
6299    #[doc = "Standard mode."]
6300    pub standard_mode: MavStandardMode,
6301    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6302    #[cfg_attr(
6303        feature = "serde",
6304        serde(
6305            serialize_with = "crate::nulstr::serialize::<_, 35>",
6306            deserialize_with = "crate::nulstr::deserialize::<_, 35>"
6307        )
6308    )]
6309    #[cfg_attr(feature = "ts", ts(type = "string"))]
6310    pub mode_name: [u8; 35],
6311}
6312impl AVAILABLE_MODES_DATA {
6313    pub const ENCODED_LEN: usize = 46usize;
6314    pub const DEFAULT: Self = Self {
6315        custom_mode: 0_u32,
6316        properties: MavModeProperty::DEFAULT,
6317        number_modes: 0_u8,
6318        mode_index: 0_u8,
6319        standard_mode: MavStandardMode::DEFAULT,
6320        mode_name: [0_u8; 35usize],
6321    };
6322    #[cfg(feature = "arbitrary")]
6323    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6324        use arbitrary::{Arbitrary, Unstructured};
6325        let mut buf = [0u8; 1024];
6326        rng.fill_bytes(&mut buf);
6327        let mut unstructured = Unstructured::new(&buf);
6328        Self::arbitrary(&mut unstructured).unwrap_or_default()
6329    }
6330}
6331impl Default for AVAILABLE_MODES_DATA {
6332    fn default() -> Self {
6333        Self::DEFAULT.clone()
6334    }
6335}
6336impl MessageData for AVAILABLE_MODES_DATA {
6337    type Message = MavMessage;
6338    const ID: u32 = 435u32;
6339    const NAME: &'static str = "AVAILABLE_MODES";
6340    const EXTRA_CRC: u8 = 134u8;
6341    const ENCODED_LEN: usize = 46usize;
6342    fn deser(
6343        _version: MavlinkVersion,
6344        __input: &[u8],
6345    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6346        let avail_len = __input.len();
6347        let mut payload_buf = [0; Self::ENCODED_LEN];
6348        let mut buf = if avail_len < Self::ENCODED_LEN {
6349            payload_buf[0..avail_len].copy_from_slice(__input);
6350            Bytes::new(&payload_buf)
6351        } else {
6352            Bytes::new(__input)
6353        };
6354        let mut __struct = Self::default();
6355        __struct.custom_mode = buf.get_u32_le();
6356        let tmp = buf.get_u32_le();
6357        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6358            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6359                flag_type: "MavModeProperty",
6360                value: tmp as u32,
6361            })?;
6362        __struct.number_modes = buf.get_u8();
6363        __struct.mode_index = buf.get_u8();
6364        let tmp = buf.get_u8();
6365        __struct.standard_mode =
6366            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6367                enum_type: "MavStandardMode",
6368                value: tmp as u32,
6369            })?;
6370        for v in &mut __struct.mode_name {
6371            let val = buf.get_u8();
6372            *v = val;
6373        }
6374        Ok(__struct)
6375    }
6376    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6377        let mut __tmp = BytesMut::new(bytes);
6378        #[allow(clippy::absurd_extreme_comparisons)]
6379        #[allow(unused_comparisons)]
6380        if __tmp.remaining() < Self::ENCODED_LEN {
6381            panic!(
6382                "buffer is too small (need {} bytes, but got {})",
6383                Self::ENCODED_LEN,
6384                __tmp.remaining(),
6385            )
6386        }
6387        __tmp.put_u32_le(self.custom_mode);
6388        __tmp.put_u32_le(self.properties.bits());
6389        __tmp.put_u8(self.number_modes);
6390        __tmp.put_u8(self.mode_index);
6391        __tmp.put_u8(self.standard_mode as u8);
6392        for val in &self.mode_name {
6393            __tmp.put_u8(*val);
6394        }
6395        if matches!(version, MavlinkVersion::V2) {
6396            let len = __tmp.len();
6397            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6398        } else {
6399            __tmp.len()
6400        }
6401    }
6402}
6403#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6404#[doc = ""]
6405#[doc = "ID: 437"]
6406#[derive(Debug, Clone, PartialEq)]
6407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6409#[cfg_attr(feature = "ts", derive(TS))]
6410#[cfg_attr(feature = "ts", ts(export))]
6411pub struct AVAILABLE_MODES_MONITOR_DATA {
6412    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6413    pub seq: u8,
6414}
6415impl AVAILABLE_MODES_MONITOR_DATA {
6416    pub const ENCODED_LEN: usize = 1usize;
6417    pub const DEFAULT: Self = Self { seq: 0_u8 };
6418    #[cfg(feature = "arbitrary")]
6419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6420        use arbitrary::{Arbitrary, Unstructured};
6421        let mut buf = [0u8; 1024];
6422        rng.fill_bytes(&mut buf);
6423        let mut unstructured = Unstructured::new(&buf);
6424        Self::arbitrary(&mut unstructured).unwrap_or_default()
6425    }
6426}
6427impl Default for AVAILABLE_MODES_MONITOR_DATA {
6428    fn default() -> Self {
6429        Self::DEFAULT.clone()
6430    }
6431}
6432impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6433    type Message = MavMessage;
6434    const ID: u32 = 437u32;
6435    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6436    const EXTRA_CRC: u8 = 30u8;
6437    const ENCODED_LEN: usize = 1usize;
6438    fn deser(
6439        _version: MavlinkVersion,
6440        __input: &[u8],
6441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6442        let avail_len = __input.len();
6443        let mut payload_buf = [0; Self::ENCODED_LEN];
6444        let mut buf = if avail_len < Self::ENCODED_LEN {
6445            payload_buf[0..avail_len].copy_from_slice(__input);
6446            Bytes::new(&payload_buf)
6447        } else {
6448            Bytes::new(__input)
6449        };
6450        let mut __struct = Self::default();
6451        __struct.seq = buf.get_u8();
6452        Ok(__struct)
6453    }
6454    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6455        let mut __tmp = BytesMut::new(bytes);
6456        #[allow(clippy::absurd_extreme_comparisons)]
6457        #[allow(unused_comparisons)]
6458        if __tmp.remaining() < Self::ENCODED_LEN {
6459            panic!(
6460                "buffer is too small (need {} bytes, but got {})",
6461                Self::ENCODED_LEN,
6462                __tmp.remaining(),
6463            )
6464        }
6465        __tmp.put_u8(self.seq);
6466        if matches!(version, MavlinkVersion::V2) {
6467            let len = __tmp.len();
6468            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6469        } else {
6470            __tmp.len()
6471        }
6472    }
6473}
6474#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6475#[doc = ""]
6476#[doc = "ID: 372"]
6477#[derive(Debug, Clone, PartialEq)]
6478#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6479#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6480#[cfg_attr(feature = "ts", derive(TS))]
6481#[cfg_attr(feature = "ts", ts(export))]
6482pub struct BATTERY_INFO_DATA {
6483    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6484    pub discharge_minimum_voltage: f32,
6485    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6486    pub charging_minimum_voltage: f32,
6487    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6488    pub resting_minimum_voltage: f32,
6489    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6490    pub charging_maximum_voltage: f32,
6491    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6492    pub charging_maximum_current: f32,
6493    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6494    pub nominal_voltage: f32,
6495    #[doc = "Maximum pack discharge current. 0: field not provided."]
6496    pub discharge_maximum_current: f32,
6497    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6498    pub discharge_maximum_burst_current: f32,
6499    #[doc = "Fully charged design capacity. 0: field not provided."]
6500    pub design_capacity: f32,
6501    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6502    pub full_charge_capacity: f32,
6503    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6504    pub cycle_count: u16,
6505    #[doc = "Battery weight. 0: field not provided."]
6506    pub weight: u16,
6507    #[doc = "Battery ID"]
6508    pub id: u8,
6509    #[doc = "Function of the battery."]
6510    pub battery_function: MavBatteryFunction,
6511    #[doc = "Type (chemistry) of the battery."]
6512    pub mavtype: MavBatteryType,
6513    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6514    pub state_of_health: u8,
6515    #[doc = "Number of battery cells in series. 0: field not provided."]
6516    pub cells_in_series: u8,
6517    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6518    #[cfg_attr(
6519        feature = "serde",
6520        serde(
6521            serialize_with = "crate::nulstr::serialize::<_, 9>",
6522            deserialize_with = "crate::nulstr::deserialize::<_, 9>"
6523        )
6524    )]
6525    #[cfg_attr(feature = "ts", ts(type = "string"))]
6526    pub manufacture_date: [u8; 9],
6527    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6528    #[cfg_attr(
6529        feature = "serde",
6530        serde(
6531            serialize_with = "crate::nulstr::serialize::<_, 32>",
6532            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
6533        )
6534    )]
6535    #[cfg_attr(feature = "ts", ts(type = "string"))]
6536    pub serial_number: [u8; 32],
6537    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6538    #[cfg_attr(
6539        feature = "serde",
6540        serde(
6541            serialize_with = "crate::nulstr::serialize::<_, 50>",
6542            deserialize_with = "crate::nulstr::deserialize::<_, 50>"
6543        )
6544    )]
6545    #[cfg_attr(feature = "ts", ts(type = "string"))]
6546    pub name: [u8; 50],
6547}
6548impl BATTERY_INFO_DATA {
6549    pub const ENCODED_LEN: usize = 140usize;
6550    pub const DEFAULT: Self = Self {
6551        discharge_minimum_voltage: 0.0_f32,
6552        charging_minimum_voltage: 0.0_f32,
6553        resting_minimum_voltage: 0.0_f32,
6554        charging_maximum_voltage: 0.0_f32,
6555        charging_maximum_current: 0.0_f32,
6556        nominal_voltage: 0.0_f32,
6557        discharge_maximum_current: 0.0_f32,
6558        discharge_maximum_burst_current: 0.0_f32,
6559        design_capacity: 0.0_f32,
6560        full_charge_capacity: 0.0_f32,
6561        cycle_count: 0_u16,
6562        weight: 0_u16,
6563        id: 0_u8,
6564        battery_function: MavBatteryFunction::DEFAULT,
6565        mavtype: MavBatteryType::DEFAULT,
6566        state_of_health: 0_u8,
6567        cells_in_series: 0_u8,
6568        manufacture_date: [0_u8; 9usize],
6569        serial_number: [0_u8; 32usize],
6570        name: [0_u8; 50usize],
6571    };
6572    #[cfg(feature = "arbitrary")]
6573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6574        use arbitrary::{Arbitrary, Unstructured};
6575        let mut buf = [0u8; 1024];
6576        rng.fill_bytes(&mut buf);
6577        let mut unstructured = Unstructured::new(&buf);
6578        Self::arbitrary(&mut unstructured).unwrap_or_default()
6579    }
6580}
6581impl Default for BATTERY_INFO_DATA {
6582    fn default() -> Self {
6583        Self::DEFAULT.clone()
6584    }
6585}
6586impl MessageData for BATTERY_INFO_DATA {
6587    type Message = MavMessage;
6588    const ID: u32 = 372u32;
6589    const NAME: &'static str = "BATTERY_INFO";
6590    const EXTRA_CRC: u8 = 26u8;
6591    const ENCODED_LEN: usize = 140usize;
6592    fn deser(
6593        _version: MavlinkVersion,
6594        __input: &[u8],
6595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6596        let avail_len = __input.len();
6597        let mut payload_buf = [0; Self::ENCODED_LEN];
6598        let mut buf = if avail_len < Self::ENCODED_LEN {
6599            payload_buf[0..avail_len].copy_from_slice(__input);
6600            Bytes::new(&payload_buf)
6601        } else {
6602            Bytes::new(__input)
6603        };
6604        let mut __struct = Self::default();
6605        __struct.discharge_minimum_voltage = buf.get_f32_le();
6606        __struct.charging_minimum_voltage = buf.get_f32_le();
6607        __struct.resting_minimum_voltage = buf.get_f32_le();
6608        __struct.charging_maximum_voltage = buf.get_f32_le();
6609        __struct.charging_maximum_current = buf.get_f32_le();
6610        __struct.nominal_voltage = buf.get_f32_le();
6611        __struct.discharge_maximum_current = buf.get_f32_le();
6612        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6613        __struct.design_capacity = buf.get_f32_le();
6614        __struct.full_charge_capacity = buf.get_f32_le();
6615        __struct.cycle_count = buf.get_u16_le();
6616        __struct.weight = buf.get_u16_le();
6617        __struct.id = buf.get_u8();
6618        let tmp = buf.get_u8();
6619        __struct.battery_function =
6620            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6621                enum_type: "MavBatteryFunction",
6622                value: tmp as u32,
6623            })?;
6624        let tmp = buf.get_u8();
6625        __struct.mavtype =
6626            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6627                enum_type: "MavBatteryType",
6628                value: tmp as u32,
6629            })?;
6630        __struct.state_of_health = buf.get_u8();
6631        __struct.cells_in_series = buf.get_u8();
6632        for v in &mut __struct.manufacture_date {
6633            let val = buf.get_u8();
6634            *v = val;
6635        }
6636        for v in &mut __struct.serial_number {
6637            let val = buf.get_u8();
6638            *v = val;
6639        }
6640        for v in &mut __struct.name {
6641            let val = buf.get_u8();
6642            *v = val;
6643        }
6644        Ok(__struct)
6645    }
6646    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6647        let mut __tmp = BytesMut::new(bytes);
6648        #[allow(clippy::absurd_extreme_comparisons)]
6649        #[allow(unused_comparisons)]
6650        if __tmp.remaining() < Self::ENCODED_LEN {
6651            panic!(
6652                "buffer is too small (need {} bytes, but got {})",
6653                Self::ENCODED_LEN,
6654                __tmp.remaining(),
6655            )
6656        }
6657        __tmp.put_f32_le(self.discharge_minimum_voltage);
6658        __tmp.put_f32_le(self.charging_minimum_voltage);
6659        __tmp.put_f32_le(self.resting_minimum_voltage);
6660        __tmp.put_f32_le(self.charging_maximum_voltage);
6661        __tmp.put_f32_le(self.charging_maximum_current);
6662        __tmp.put_f32_le(self.nominal_voltage);
6663        __tmp.put_f32_le(self.discharge_maximum_current);
6664        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6665        __tmp.put_f32_le(self.design_capacity);
6666        __tmp.put_f32_le(self.full_charge_capacity);
6667        __tmp.put_u16_le(self.cycle_count);
6668        __tmp.put_u16_le(self.weight);
6669        __tmp.put_u8(self.id);
6670        __tmp.put_u8(self.battery_function as u8);
6671        __tmp.put_u8(self.mavtype as u8);
6672        __tmp.put_u8(self.state_of_health);
6673        __tmp.put_u8(self.cells_in_series);
6674        for val in &self.manufacture_date {
6675            __tmp.put_u8(*val);
6676        }
6677        for val in &self.serial_number {
6678            __tmp.put_u8(*val);
6679        }
6680        for val in &self.name {
6681            __tmp.put_u8(*val);
6682        }
6683        if matches!(version, MavlinkVersion::V2) {
6684            let len = __tmp.len();
6685            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6686        } else {
6687            __tmp.len()
6688        }
6689    }
6690}
6691#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6692#[doc = ""]
6693#[doc = "ID: 147"]
6694#[derive(Debug, Clone, PartialEq)]
6695#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6696#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6697#[cfg_attr(feature = "ts", derive(TS))]
6698#[cfg_attr(feature = "ts", ts(export))]
6699pub struct BATTERY_STATUS_DATA {
6700    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6701    pub current_consumed: i32,
6702    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6703    pub energy_consumed: i32,
6704    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6705    pub temperature: i16,
6706    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6707    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6708    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6709    pub voltages: [u16; 10],
6710    #[doc = "Battery current, -1: autopilot does not measure the current"]
6711    pub current_battery: i16,
6712    #[doc = "Battery ID"]
6713    pub id: u8,
6714    #[doc = "Function of the battery"]
6715    pub battery_function: MavBatteryFunction,
6716    #[doc = "Type (chemistry) of the battery"]
6717    pub mavtype: MavBatteryType,
6718    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6719    pub battery_remaining: i8,
6720    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6721    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6722    pub time_remaining: i32,
6723    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6724    #[cfg_attr(feature = "serde", serde(default))]
6725    pub charge_state: MavBatteryChargeState,
6726    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6727    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6728    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6729    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6730    pub voltages_ext: [u16; 4],
6731    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6732    #[cfg_attr(feature = "serde", serde(default))]
6733    pub mode: MavBatteryMode,
6734    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6735    #[cfg_attr(feature = "serde", serde(default))]
6736    pub fault_bitmask: MavBatteryFault,
6737}
6738impl BATTERY_STATUS_DATA {
6739    pub const ENCODED_LEN: usize = 54usize;
6740    pub const DEFAULT: Self = Self {
6741        current_consumed: 0_i32,
6742        energy_consumed: 0_i32,
6743        temperature: 0_i16,
6744        voltages: [0_u16; 10usize],
6745        current_battery: 0_i16,
6746        id: 0_u8,
6747        battery_function: MavBatteryFunction::DEFAULT,
6748        mavtype: MavBatteryType::DEFAULT,
6749        battery_remaining: 0_i8,
6750        time_remaining: 0_i32,
6751        charge_state: MavBatteryChargeState::DEFAULT,
6752        voltages_ext: [0_u16; 4usize],
6753        mode: MavBatteryMode::DEFAULT,
6754        fault_bitmask: MavBatteryFault::DEFAULT,
6755    };
6756    #[cfg(feature = "arbitrary")]
6757    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6758        use arbitrary::{Arbitrary, Unstructured};
6759        let mut buf = [0u8; 1024];
6760        rng.fill_bytes(&mut buf);
6761        let mut unstructured = Unstructured::new(&buf);
6762        Self::arbitrary(&mut unstructured).unwrap_or_default()
6763    }
6764}
6765impl Default for BATTERY_STATUS_DATA {
6766    fn default() -> Self {
6767        Self::DEFAULT.clone()
6768    }
6769}
6770impl MessageData for BATTERY_STATUS_DATA {
6771    type Message = MavMessage;
6772    const ID: u32 = 147u32;
6773    const NAME: &'static str = "BATTERY_STATUS";
6774    const EXTRA_CRC: u8 = 154u8;
6775    const ENCODED_LEN: usize = 54usize;
6776    fn deser(
6777        _version: MavlinkVersion,
6778        __input: &[u8],
6779    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6780        let avail_len = __input.len();
6781        let mut payload_buf = [0; Self::ENCODED_LEN];
6782        let mut buf = if avail_len < Self::ENCODED_LEN {
6783            payload_buf[0..avail_len].copy_from_slice(__input);
6784            Bytes::new(&payload_buf)
6785        } else {
6786            Bytes::new(__input)
6787        };
6788        let mut __struct = Self::default();
6789        __struct.current_consumed = buf.get_i32_le();
6790        __struct.energy_consumed = buf.get_i32_le();
6791        __struct.temperature = buf.get_i16_le();
6792        for v in &mut __struct.voltages {
6793            let val = buf.get_u16_le();
6794            *v = val;
6795        }
6796        __struct.current_battery = buf.get_i16_le();
6797        __struct.id = buf.get_u8();
6798        let tmp = buf.get_u8();
6799        __struct.battery_function =
6800            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6801                enum_type: "MavBatteryFunction",
6802                value: tmp as u32,
6803            })?;
6804        let tmp = buf.get_u8();
6805        __struct.mavtype =
6806            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6807                enum_type: "MavBatteryType",
6808                value: tmp as u32,
6809            })?;
6810        __struct.battery_remaining = buf.get_i8();
6811        __struct.time_remaining = buf.get_i32_le();
6812        let tmp = buf.get_u8();
6813        __struct.charge_state =
6814            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6815                enum_type: "MavBatteryChargeState",
6816                value: tmp as u32,
6817            })?;
6818        for v in &mut __struct.voltages_ext {
6819            let val = buf.get_u16_le();
6820            *v = val;
6821        }
6822        let tmp = buf.get_u8();
6823        __struct.mode =
6824            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6825                enum_type: "MavBatteryMode",
6826                value: tmp as u32,
6827            })?;
6828        let tmp = buf.get_u32_le();
6829        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
6830            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6831                flag_type: "MavBatteryFault",
6832                value: tmp as u32,
6833            })?;
6834        Ok(__struct)
6835    }
6836    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6837        let mut __tmp = BytesMut::new(bytes);
6838        #[allow(clippy::absurd_extreme_comparisons)]
6839        #[allow(unused_comparisons)]
6840        if __tmp.remaining() < Self::ENCODED_LEN {
6841            panic!(
6842                "buffer is too small (need {} bytes, but got {})",
6843                Self::ENCODED_LEN,
6844                __tmp.remaining(),
6845            )
6846        }
6847        __tmp.put_i32_le(self.current_consumed);
6848        __tmp.put_i32_le(self.energy_consumed);
6849        __tmp.put_i16_le(self.temperature);
6850        for val in &self.voltages {
6851            __tmp.put_u16_le(*val);
6852        }
6853        __tmp.put_i16_le(self.current_battery);
6854        __tmp.put_u8(self.id);
6855        __tmp.put_u8(self.battery_function as u8);
6856        __tmp.put_u8(self.mavtype as u8);
6857        __tmp.put_i8(self.battery_remaining);
6858        if matches!(version, MavlinkVersion::V2) {
6859            __tmp.put_i32_le(self.time_remaining);
6860            __tmp.put_u8(self.charge_state as u8);
6861            for val in &self.voltages_ext {
6862                __tmp.put_u16_le(*val);
6863            }
6864            __tmp.put_u8(self.mode as u8);
6865            __tmp.put_u32_le(self.fault_bitmask.bits());
6866            let len = __tmp.len();
6867            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6868        } else {
6869            __tmp.len()
6870        }
6871    }
6872}
6873#[doc = "Report button state change."]
6874#[doc = ""]
6875#[doc = "ID: 257"]
6876#[derive(Debug, Clone, PartialEq)]
6877#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6879#[cfg_attr(feature = "ts", derive(TS))]
6880#[cfg_attr(feature = "ts", ts(export))]
6881pub struct BUTTON_CHANGE_DATA {
6882    #[doc = "Timestamp (time since system boot)."]
6883    pub time_boot_ms: u32,
6884    #[doc = "Time of last change of button state."]
6885    pub last_change_ms: u32,
6886    #[doc = "Bitmap for state of buttons."]
6887    pub state: u8,
6888}
6889impl BUTTON_CHANGE_DATA {
6890    pub const ENCODED_LEN: usize = 9usize;
6891    pub const DEFAULT: Self = Self {
6892        time_boot_ms: 0_u32,
6893        last_change_ms: 0_u32,
6894        state: 0_u8,
6895    };
6896    #[cfg(feature = "arbitrary")]
6897    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6898        use arbitrary::{Arbitrary, Unstructured};
6899        let mut buf = [0u8; 1024];
6900        rng.fill_bytes(&mut buf);
6901        let mut unstructured = Unstructured::new(&buf);
6902        Self::arbitrary(&mut unstructured).unwrap_or_default()
6903    }
6904}
6905impl Default for BUTTON_CHANGE_DATA {
6906    fn default() -> Self {
6907        Self::DEFAULT.clone()
6908    }
6909}
6910impl MessageData for BUTTON_CHANGE_DATA {
6911    type Message = MavMessage;
6912    const ID: u32 = 257u32;
6913    const NAME: &'static str = "BUTTON_CHANGE";
6914    const EXTRA_CRC: u8 = 131u8;
6915    const ENCODED_LEN: usize = 9usize;
6916    fn deser(
6917        _version: MavlinkVersion,
6918        __input: &[u8],
6919    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6920        let avail_len = __input.len();
6921        let mut payload_buf = [0; Self::ENCODED_LEN];
6922        let mut buf = if avail_len < Self::ENCODED_LEN {
6923            payload_buf[0..avail_len].copy_from_slice(__input);
6924            Bytes::new(&payload_buf)
6925        } else {
6926            Bytes::new(__input)
6927        };
6928        let mut __struct = Self::default();
6929        __struct.time_boot_ms = buf.get_u32_le();
6930        __struct.last_change_ms = buf.get_u32_le();
6931        __struct.state = buf.get_u8();
6932        Ok(__struct)
6933    }
6934    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6935        let mut __tmp = BytesMut::new(bytes);
6936        #[allow(clippy::absurd_extreme_comparisons)]
6937        #[allow(unused_comparisons)]
6938        if __tmp.remaining() < Self::ENCODED_LEN {
6939            panic!(
6940                "buffer is too small (need {} bytes, but got {})",
6941                Self::ENCODED_LEN,
6942                __tmp.remaining(),
6943            )
6944        }
6945        __tmp.put_u32_le(self.time_boot_ms);
6946        __tmp.put_u32_le(self.last_change_ms);
6947        __tmp.put_u8(self.state);
6948        if matches!(version, MavlinkVersion::V2) {
6949            let len = __tmp.len();
6950            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6951        } else {
6952            __tmp.len()
6953        }
6954    }
6955}
6956#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6957#[doc = ""]
6958#[doc = "ID: 262"]
6959#[derive(Debug, Clone, PartialEq)]
6960#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6961#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6962#[cfg_attr(feature = "ts", derive(TS))]
6963#[cfg_attr(feature = "ts", ts(export))]
6964pub struct CAMERA_CAPTURE_STATUS_DATA {
6965    #[doc = "Timestamp (time since system boot)."]
6966    pub time_boot_ms: u32,
6967    #[doc = "Image capture interval"]
6968    pub image_interval: f32,
6969    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6970    pub recording_time_ms: u32,
6971    #[doc = "Available storage capacity."]
6972    pub available_capacity: f32,
6973    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6974    pub image_status: u8,
6975    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6976    pub video_status: u8,
6977    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6978    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6979    pub image_count: i32,
6980    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6981    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6982    pub camera_device_id: u8,
6983}
6984impl CAMERA_CAPTURE_STATUS_DATA {
6985    pub const ENCODED_LEN: usize = 23usize;
6986    pub const DEFAULT: Self = Self {
6987        time_boot_ms: 0_u32,
6988        image_interval: 0.0_f32,
6989        recording_time_ms: 0_u32,
6990        available_capacity: 0.0_f32,
6991        image_status: 0_u8,
6992        video_status: 0_u8,
6993        image_count: 0_i32,
6994        camera_device_id: 0_u8,
6995    };
6996    #[cfg(feature = "arbitrary")]
6997    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6998        use arbitrary::{Arbitrary, Unstructured};
6999        let mut buf = [0u8; 1024];
7000        rng.fill_bytes(&mut buf);
7001        let mut unstructured = Unstructured::new(&buf);
7002        Self::arbitrary(&mut unstructured).unwrap_or_default()
7003    }
7004}
7005impl Default for CAMERA_CAPTURE_STATUS_DATA {
7006    fn default() -> Self {
7007        Self::DEFAULT.clone()
7008    }
7009}
7010impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7011    type Message = MavMessage;
7012    const ID: u32 = 262u32;
7013    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7014    const EXTRA_CRC: u8 = 12u8;
7015    const ENCODED_LEN: usize = 23usize;
7016    fn deser(
7017        _version: MavlinkVersion,
7018        __input: &[u8],
7019    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7020        let avail_len = __input.len();
7021        let mut payload_buf = [0; Self::ENCODED_LEN];
7022        let mut buf = if avail_len < Self::ENCODED_LEN {
7023            payload_buf[0..avail_len].copy_from_slice(__input);
7024            Bytes::new(&payload_buf)
7025        } else {
7026            Bytes::new(__input)
7027        };
7028        let mut __struct = Self::default();
7029        __struct.time_boot_ms = buf.get_u32_le();
7030        __struct.image_interval = buf.get_f32_le();
7031        __struct.recording_time_ms = buf.get_u32_le();
7032        __struct.available_capacity = buf.get_f32_le();
7033        __struct.image_status = buf.get_u8();
7034        __struct.video_status = buf.get_u8();
7035        __struct.image_count = buf.get_i32_le();
7036        __struct.camera_device_id = buf.get_u8();
7037        Ok(__struct)
7038    }
7039    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7040        let mut __tmp = BytesMut::new(bytes);
7041        #[allow(clippy::absurd_extreme_comparisons)]
7042        #[allow(unused_comparisons)]
7043        if __tmp.remaining() < Self::ENCODED_LEN {
7044            panic!(
7045                "buffer is too small (need {} bytes, but got {})",
7046                Self::ENCODED_LEN,
7047                __tmp.remaining(),
7048            )
7049        }
7050        __tmp.put_u32_le(self.time_boot_ms);
7051        __tmp.put_f32_le(self.image_interval);
7052        __tmp.put_u32_le(self.recording_time_ms);
7053        __tmp.put_f32_le(self.available_capacity);
7054        __tmp.put_u8(self.image_status);
7055        __tmp.put_u8(self.video_status);
7056        if matches!(version, MavlinkVersion::V2) {
7057            __tmp.put_i32_le(self.image_count);
7058            __tmp.put_u8(self.camera_device_id);
7059            let len = __tmp.len();
7060            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7061        } else {
7062            __tmp.len()
7063        }
7064    }
7065}
7066#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7067#[doc = ""]
7068#[doc = "ID: 271"]
7069#[derive(Debug, Clone, PartialEq)]
7070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7071#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7072#[cfg_attr(feature = "ts", derive(TS))]
7073#[cfg_attr(feature = "ts", ts(export))]
7074pub struct CAMERA_FOV_STATUS_DATA {
7075    #[doc = "Timestamp (time since system boot)."]
7076    pub time_boot_ms: u32,
7077    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7078    pub lat_camera: i32,
7079    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7080    pub lon_camera: i32,
7081    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7082    pub alt_camera: i32,
7083    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7084    pub lat_image: i32,
7085    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7086    pub lon_image: i32,
7087    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7088    pub alt_image: i32,
7089    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7090    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7091    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7092    pub q: [f32; 4],
7093    #[doc = "Horizontal field of view (NaN if unknown)."]
7094    pub hfov: f32,
7095    #[doc = "Vertical field of view (NaN if unknown)."]
7096    pub vfov: f32,
7097    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7098    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7099    pub camera_device_id: u8,
7100}
7101impl CAMERA_FOV_STATUS_DATA {
7102    pub const ENCODED_LEN: usize = 53usize;
7103    pub const DEFAULT: Self = Self {
7104        time_boot_ms: 0_u32,
7105        lat_camera: 0_i32,
7106        lon_camera: 0_i32,
7107        alt_camera: 0_i32,
7108        lat_image: 0_i32,
7109        lon_image: 0_i32,
7110        alt_image: 0_i32,
7111        q: [0.0_f32; 4usize],
7112        hfov: 0.0_f32,
7113        vfov: 0.0_f32,
7114        camera_device_id: 0_u8,
7115    };
7116    #[cfg(feature = "arbitrary")]
7117    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7118        use arbitrary::{Arbitrary, Unstructured};
7119        let mut buf = [0u8; 1024];
7120        rng.fill_bytes(&mut buf);
7121        let mut unstructured = Unstructured::new(&buf);
7122        Self::arbitrary(&mut unstructured).unwrap_or_default()
7123    }
7124}
7125impl Default for CAMERA_FOV_STATUS_DATA {
7126    fn default() -> Self {
7127        Self::DEFAULT.clone()
7128    }
7129}
7130impl MessageData for CAMERA_FOV_STATUS_DATA {
7131    type Message = MavMessage;
7132    const ID: u32 = 271u32;
7133    const NAME: &'static str = "CAMERA_FOV_STATUS";
7134    const EXTRA_CRC: u8 = 22u8;
7135    const ENCODED_LEN: usize = 53usize;
7136    fn deser(
7137        _version: MavlinkVersion,
7138        __input: &[u8],
7139    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7140        let avail_len = __input.len();
7141        let mut payload_buf = [0; Self::ENCODED_LEN];
7142        let mut buf = if avail_len < Self::ENCODED_LEN {
7143            payload_buf[0..avail_len].copy_from_slice(__input);
7144            Bytes::new(&payload_buf)
7145        } else {
7146            Bytes::new(__input)
7147        };
7148        let mut __struct = Self::default();
7149        __struct.time_boot_ms = buf.get_u32_le();
7150        __struct.lat_camera = buf.get_i32_le();
7151        __struct.lon_camera = buf.get_i32_le();
7152        __struct.alt_camera = buf.get_i32_le();
7153        __struct.lat_image = buf.get_i32_le();
7154        __struct.lon_image = buf.get_i32_le();
7155        __struct.alt_image = buf.get_i32_le();
7156        for v in &mut __struct.q {
7157            let val = buf.get_f32_le();
7158            *v = val;
7159        }
7160        __struct.hfov = buf.get_f32_le();
7161        __struct.vfov = buf.get_f32_le();
7162        __struct.camera_device_id = buf.get_u8();
7163        Ok(__struct)
7164    }
7165    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7166        let mut __tmp = BytesMut::new(bytes);
7167        #[allow(clippy::absurd_extreme_comparisons)]
7168        #[allow(unused_comparisons)]
7169        if __tmp.remaining() < Self::ENCODED_LEN {
7170            panic!(
7171                "buffer is too small (need {} bytes, but got {})",
7172                Self::ENCODED_LEN,
7173                __tmp.remaining(),
7174            )
7175        }
7176        __tmp.put_u32_le(self.time_boot_ms);
7177        __tmp.put_i32_le(self.lat_camera);
7178        __tmp.put_i32_le(self.lon_camera);
7179        __tmp.put_i32_le(self.alt_camera);
7180        __tmp.put_i32_le(self.lat_image);
7181        __tmp.put_i32_le(self.lon_image);
7182        __tmp.put_i32_le(self.alt_image);
7183        for val in &self.q {
7184            __tmp.put_f32_le(*val);
7185        }
7186        __tmp.put_f32_le(self.hfov);
7187        __tmp.put_f32_le(self.vfov);
7188        if matches!(version, MavlinkVersion::V2) {
7189            __tmp.put_u8(self.camera_device_id);
7190            let len = __tmp.len();
7191            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7192        } else {
7193            __tmp.len()
7194        }
7195    }
7196}
7197#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7198#[doc = ""]
7199#[doc = "ID: 263"]
7200#[derive(Debug, Clone, PartialEq)]
7201#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7202#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7203#[cfg_attr(feature = "ts", derive(TS))]
7204#[cfg_attr(feature = "ts", ts(export))]
7205pub struct CAMERA_IMAGE_CAPTURED_DATA {
7206    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7207    pub time_utc: u64,
7208    #[doc = "Timestamp (time since system boot)."]
7209    pub time_boot_ms: u32,
7210    #[doc = "Latitude where image was taken"]
7211    pub lat: i32,
7212    #[doc = "Longitude where capture was taken"]
7213    pub lon: i32,
7214    #[doc = "Altitude (MSL) where image was taken"]
7215    pub alt: i32,
7216    #[doc = "Altitude above ground"]
7217    pub relative_alt: i32,
7218    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7219    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7220    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7221    pub q: [f32; 4],
7222    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7223    pub image_index: i32,
7224    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7225    pub camera_id: u8,
7226    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7227    pub capture_result: i8,
7228    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7229    #[cfg_attr(
7230        feature = "serde",
7231        serde(
7232            serialize_with = "crate::nulstr::serialize::<_, 205>",
7233            deserialize_with = "crate::nulstr::deserialize::<_, 205>"
7234        )
7235    )]
7236    #[cfg_attr(feature = "ts", ts(type = "string"))]
7237    pub file_url: [u8; 205],
7238}
7239impl CAMERA_IMAGE_CAPTURED_DATA {
7240    pub const ENCODED_LEN: usize = 255usize;
7241    pub const DEFAULT: Self = Self {
7242        time_utc: 0_u64,
7243        time_boot_ms: 0_u32,
7244        lat: 0_i32,
7245        lon: 0_i32,
7246        alt: 0_i32,
7247        relative_alt: 0_i32,
7248        q: [0.0_f32; 4usize],
7249        image_index: 0_i32,
7250        camera_id: 0_u8,
7251        capture_result: 0_i8,
7252        file_url: [0_u8; 205usize],
7253    };
7254    #[cfg(feature = "arbitrary")]
7255    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7256        use arbitrary::{Arbitrary, Unstructured};
7257        let mut buf = [0u8; 1024];
7258        rng.fill_bytes(&mut buf);
7259        let mut unstructured = Unstructured::new(&buf);
7260        Self::arbitrary(&mut unstructured).unwrap_or_default()
7261    }
7262}
7263impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7264    fn default() -> Self {
7265        Self::DEFAULT.clone()
7266    }
7267}
7268impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7269    type Message = MavMessage;
7270    const ID: u32 = 263u32;
7271    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7272    const EXTRA_CRC: u8 = 133u8;
7273    const ENCODED_LEN: usize = 255usize;
7274    fn deser(
7275        _version: MavlinkVersion,
7276        __input: &[u8],
7277    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7278        let avail_len = __input.len();
7279        let mut payload_buf = [0; Self::ENCODED_LEN];
7280        let mut buf = if avail_len < Self::ENCODED_LEN {
7281            payload_buf[0..avail_len].copy_from_slice(__input);
7282            Bytes::new(&payload_buf)
7283        } else {
7284            Bytes::new(__input)
7285        };
7286        let mut __struct = Self::default();
7287        __struct.time_utc = buf.get_u64_le();
7288        __struct.time_boot_ms = buf.get_u32_le();
7289        __struct.lat = buf.get_i32_le();
7290        __struct.lon = buf.get_i32_le();
7291        __struct.alt = buf.get_i32_le();
7292        __struct.relative_alt = buf.get_i32_le();
7293        for v in &mut __struct.q {
7294            let val = buf.get_f32_le();
7295            *v = val;
7296        }
7297        __struct.image_index = buf.get_i32_le();
7298        __struct.camera_id = buf.get_u8();
7299        __struct.capture_result = buf.get_i8();
7300        for v in &mut __struct.file_url {
7301            let val = buf.get_u8();
7302            *v = val;
7303        }
7304        Ok(__struct)
7305    }
7306    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7307        let mut __tmp = BytesMut::new(bytes);
7308        #[allow(clippy::absurd_extreme_comparisons)]
7309        #[allow(unused_comparisons)]
7310        if __tmp.remaining() < Self::ENCODED_LEN {
7311            panic!(
7312                "buffer is too small (need {} bytes, but got {})",
7313                Self::ENCODED_LEN,
7314                __tmp.remaining(),
7315            )
7316        }
7317        __tmp.put_u64_le(self.time_utc);
7318        __tmp.put_u32_le(self.time_boot_ms);
7319        __tmp.put_i32_le(self.lat);
7320        __tmp.put_i32_le(self.lon);
7321        __tmp.put_i32_le(self.alt);
7322        __tmp.put_i32_le(self.relative_alt);
7323        for val in &self.q {
7324            __tmp.put_f32_le(*val);
7325        }
7326        __tmp.put_i32_le(self.image_index);
7327        __tmp.put_u8(self.camera_id);
7328        __tmp.put_i8(self.capture_result);
7329        for val in &self.file_url {
7330            __tmp.put_u8(*val);
7331        }
7332        if matches!(version, MavlinkVersion::V2) {
7333            let len = __tmp.len();
7334            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7335        } else {
7336            __tmp.len()
7337        }
7338    }
7339}
7340#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7341#[doc = ""]
7342#[doc = "ID: 259"]
7343#[derive(Debug, Clone, PartialEq)]
7344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7346#[cfg_attr(feature = "ts", derive(TS))]
7347#[cfg_attr(feature = "ts", ts(export))]
7348pub struct CAMERA_INFORMATION_DATA {
7349    #[doc = "Timestamp (time since system boot)."]
7350    pub time_boot_ms: u32,
7351    #[doc = "0xff). Use 0 if not known."]
7352    pub firmware_version: u32,
7353    #[doc = "Focal length. Use NaN if not known."]
7354    pub focal_length: f32,
7355    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7356    pub sensor_size_h: f32,
7357    #[doc = "Image sensor size vertical. Use NaN if not known."]
7358    pub sensor_size_v: f32,
7359    #[doc = "Bitmap of camera capability flags."]
7360    pub flags: CameraCapFlags,
7361    #[doc = "Horizontal image resolution. Use 0 if not known."]
7362    pub resolution_h: u16,
7363    #[doc = "Vertical image resolution. Use 0 if not known."]
7364    pub resolution_v: u16,
7365    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7366    pub cam_definition_version: u16,
7367    #[doc = "Name of the camera vendor"]
7368    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7369    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7370    pub vendor_name: [u8; 32],
7371    #[doc = "Name of the camera model"]
7372    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7373    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7374    pub model_name: [u8; 32],
7375    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7376    pub lens_id: u8,
7377    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7378    #[cfg_attr(
7379        feature = "serde",
7380        serde(
7381            serialize_with = "crate::nulstr::serialize::<_, 140>",
7382            deserialize_with = "crate::nulstr::deserialize::<_, 140>"
7383        )
7384    )]
7385    #[cfg_attr(feature = "ts", ts(type = "string"))]
7386    pub cam_definition_uri: [u8; 140],
7387    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7388    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7389    pub gimbal_device_id: u8,
7390    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7391    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7392    pub camera_device_id: u8,
7393}
7394impl CAMERA_INFORMATION_DATA {
7395    pub const ENCODED_LEN: usize = 237usize;
7396    pub const DEFAULT: Self = Self {
7397        time_boot_ms: 0_u32,
7398        firmware_version: 0_u32,
7399        focal_length: 0.0_f32,
7400        sensor_size_h: 0.0_f32,
7401        sensor_size_v: 0.0_f32,
7402        flags: CameraCapFlags::DEFAULT,
7403        resolution_h: 0_u16,
7404        resolution_v: 0_u16,
7405        cam_definition_version: 0_u16,
7406        vendor_name: [0_u8; 32usize],
7407        model_name: [0_u8; 32usize],
7408        lens_id: 0_u8,
7409        cam_definition_uri: [0_u8; 140usize],
7410        gimbal_device_id: 0_u8,
7411        camera_device_id: 0_u8,
7412    };
7413    #[cfg(feature = "arbitrary")]
7414    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7415        use arbitrary::{Arbitrary, Unstructured};
7416        let mut buf = [0u8; 1024];
7417        rng.fill_bytes(&mut buf);
7418        let mut unstructured = Unstructured::new(&buf);
7419        Self::arbitrary(&mut unstructured).unwrap_or_default()
7420    }
7421}
7422impl Default for CAMERA_INFORMATION_DATA {
7423    fn default() -> Self {
7424        Self::DEFAULT.clone()
7425    }
7426}
7427impl MessageData for CAMERA_INFORMATION_DATA {
7428    type Message = MavMessage;
7429    const ID: u32 = 259u32;
7430    const NAME: &'static str = "CAMERA_INFORMATION";
7431    const EXTRA_CRC: u8 = 92u8;
7432    const ENCODED_LEN: usize = 237usize;
7433    fn deser(
7434        _version: MavlinkVersion,
7435        __input: &[u8],
7436    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7437        let avail_len = __input.len();
7438        let mut payload_buf = [0; Self::ENCODED_LEN];
7439        let mut buf = if avail_len < Self::ENCODED_LEN {
7440            payload_buf[0..avail_len].copy_from_slice(__input);
7441            Bytes::new(&payload_buf)
7442        } else {
7443            Bytes::new(__input)
7444        };
7445        let mut __struct = Self::default();
7446        __struct.time_boot_ms = buf.get_u32_le();
7447        __struct.firmware_version = buf.get_u32_le();
7448        __struct.focal_length = buf.get_f32_le();
7449        __struct.sensor_size_h = buf.get_f32_le();
7450        __struct.sensor_size_v = buf.get_f32_le();
7451        let tmp = buf.get_u32_le();
7452        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7453            ::mavlink_core::error::ParserError::InvalidFlag {
7454                flag_type: "CameraCapFlags",
7455                value: tmp as u32,
7456            },
7457        )?;
7458        __struct.resolution_h = buf.get_u16_le();
7459        __struct.resolution_v = buf.get_u16_le();
7460        __struct.cam_definition_version = buf.get_u16_le();
7461        for v in &mut __struct.vendor_name {
7462            let val = buf.get_u8();
7463            *v = val;
7464        }
7465        for v in &mut __struct.model_name {
7466            let val = buf.get_u8();
7467            *v = val;
7468        }
7469        __struct.lens_id = buf.get_u8();
7470        for v in &mut __struct.cam_definition_uri {
7471            let val = buf.get_u8();
7472            *v = val;
7473        }
7474        __struct.gimbal_device_id = buf.get_u8();
7475        __struct.camera_device_id = buf.get_u8();
7476        Ok(__struct)
7477    }
7478    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7479        let mut __tmp = BytesMut::new(bytes);
7480        #[allow(clippy::absurd_extreme_comparisons)]
7481        #[allow(unused_comparisons)]
7482        if __tmp.remaining() < Self::ENCODED_LEN {
7483            panic!(
7484                "buffer is too small (need {} bytes, but got {})",
7485                Self::ENCODED_LEN,
7486                __tmp.remaining(),
7487            )
7488        }
7489        __tmp.put_u32_le(self.time_boot_ms);
7490        __tmp.put_u32_le(self.firmware_version);
7491        __tmp.put_f32_le(self.focal_length);
7492        __tmp.put_f32_le(self.sensor_size_h);
7493        __tmp.put_f32_le(self.sensor_size_v);
7494        __tmp.put_u32_le(self.flags.bits());
7495        __tmp.put_u16_le(self.resolution_h);
7496        __tmp.put_u16_le(self.resolution_v);
7497        __tmp.put_u16_le(self.cam_definition_version);
7498        for val in &self.vendor_name {
7499            __tmp.put_u8(*val);
7500        }
7501        for val in &self.model_name {
7502            __tmp.put_u8(*val);
7503        }
7504        __tmp.put_u8(self.lens_id);
7505        for val in &self.cam_definition_uri {
7506            __tmp.put_u8(*val);
7507        }
7508        if matches!(version, MavlinkVersion::V2) {
7509            __tmp.put_u8(self.gimbal_device_id);
7510            __tmp.put_u8(self.camera_device_id);
7511            let len = __tmp.len();
7512            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7513        } else {
7514            __tmp.len()
7515        }
7516    }
7517}
7518#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7519#[doc = ""]
7520#[doc = "ID: 260"]
7521#[derive(Debug, Clone, PartialEq)]
7522#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7523#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7524#[cfg_attr(feature = "ts", derive(TS))]
7525#[cfg_attr(feature = "ts", ts(export))]
7526pub struct CAMERA_SETTINGS_DATA {
7527    #[doc = "Timestamp (time since system boot)."]
7528    pub time_boot_ms: u32,
7529    #[doc = "Camera mode"]
7530    pub mode_id: CameraMode,
7531    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7532    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7533    pub zoomLevel: f32,
7534    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7535    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7536    pub focusLevel: f32,
7537    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7538    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7539    pub camera_device_id: u8,
7540}
7541impl CAMERA_SETTINGS_DATA {
7542    pub const ENCODED_LEN: usize = 14usize;
7543    pub const DEFAULT: Self = Self {
7544        time_boot_ms: 0_u32,
7545        mode_id: CameraMode::DEFAULT,
7546        zoomLevel: 0.0_f32,
7547        focusLevel: 0.0_f32,
7548        camera_device_id: 0_u8,
7549    };
7550    #[cfg(feature = "arbitrary")]
7551    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7552        use arbitrary::{Arbitrary, Unstructured};
7553        let mut buf = [0u8; 1024];
7554        rng.fill_bytes(&mut buf);
7555        let mut unstructured = Unstructured::new(&buf);
7556        Self::arbitrary(&mut unstructured).unwrap_or_default()
7557    }
7558}
7559impl Default for CAMERA_SETTINGS_DATA {
7560    fn default() -> Self {
7561        Self::DEFAULT.clone()
7562    }
7563}
7564impl MessageData for CAMERA_SETTINGS_DATA {
7565    type Message = MavMessage;
7566    const ID: u32 = 260u32;
7567    const NAME: &'static str = "CAMERA_SETTINGS";
7568    const EXTRA_CRC: u8 = 146u8;
7569    const ENCODED_LEN: usize = 14usize;
7570    fn deser(
7571        _version: MavlinkVersion,
7572        __input: &[u8],
7573    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7574        let avail_len = __input.len();
7575        let mut payload_buf = [0; Self::ENCODED_LEN];
7576        let mut buf = if avail_len < Self::ENCODED_LEN {
7577            payload_buf[0..avail_len].copy_from_slice(__input);
7578            Bytes::new(&payload_buf)
7579        } else {
7580            Bytes::new(__input)
7581        };
7582        let mut __struct = Self::default();
7583        __struct.time_boot_ms = buf.get_u32_le();
7584        let tmp = buf.get_u8();
7585        __struct.mode_id =
7586            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7587                enum_type: "CameraMode",
7588                value: tmp as u32,
7589            })?;
7590        __struct.zoomLevel = buf.get_f32_le();
7591        __struct.focusLevel = buf.get_f32_le();
7592        __struct.camera_device_id = buf.get_u8();
7593        Ok(__struct)
7594    }
7595    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7596        let mut __tmp = BytesMut::new(bytes);
7597        #[allow(clippy::absurd_extreme_comparisons)]
7598        #[allow(unused_comparisons)]
7599        if __tmp.remaining() < Self::ENCODED_LEN {
7600            panic!(
7601                "buffer is too small (need {} bytes, but got {})",
7602                Self::ENCODED_LEN,
7603                __tmp.remaining(),
7604            )
7605        }
7606        __tmp.put_u32_le(self.time_boot_ms);
7607        __tmp.put_u8(self.mode_id as u8);
7608        if matches!(version, MavlinkVersion::V2) {
7609            __tmp.put_f32_le(self.zoomLevel);
7610            __tmp.put_f32_le(self.focusLevel);
7611            __tmp.put_u8(self.camera_device_id);
7612            let len = __tmp.len();
7613            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7614        } else {
7615            __tmp.len()
7616        }
7617    }
7618}
7619#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7620#[doc = ""]
7621#[doc = "ID: 277"]
7622#[derive(Debug, Clone, PartialEq)]
7623#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7625#[cfg_attr(feature = "ts", derive(TS))]
7626#[cfg_attr(feature = "ts", ts(export))]
7627pub struct CAMERA_THERMAL_RANGE_DATA {
7628    #[doc = "Timestamp (time since system boot)."]
7629    pub time_boot_ms: u32,
7630    #[doc = "Temperature max."]
7631    pub max: f32,
7632    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7633    pub max_point_x: f32,
7634    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7635    pub max_point_y: f32,
7636    #[doc = "Temperature min."]
7637    pub min: f32,
7638    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7639    pub min_point_x: f32,
7640    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7641    pub min_point_y: f32,
7642    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7643    pub stream_id: u8,
7644    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7645    pub camera_device_id: u8,
7646}
7647impl CAMERA_THERMAL_RANGE_DATA {
7648    pub const ENCODED_LEN: usize = 30usize;
7649    pub const DEFAULT: Self = Self {
7650        time_boot_ms: 0_u32,
7651        max: 0.0_f32,
7652        max_point_x: 0.0_f32,
7653        max_point_y: 0.0_f32,
7654        min: 0.0_f32,
7655        min_point_x: 0.0_f32,
7656        min_point_y: 0.0_f32,
7657        stream_id: 0_u8,
7658        camera_device_id: 0_u8,
7659    };
7660    #[cfg(feature = "arbitrary")]
7661    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7662        use arbitrary::{Arbitrary, Unstructured};
7663        let mut buf = [0u8; 1024];
7664        rng.fill_bytes(&mut buf);
7665        let mut unstructured = Unstructured::new(&buf);
7666        Self::arbitrary(&mut unstructured).unwrap_or_default()
7667    }
7668}
7669impl Default for CAMERA_THERMAL_RANGE_DATA {
7670    fn default() -> Self {
7671        Self::DEFAULT.clone()
7672    }
7673}
7674impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7675    type Message = MavMessage;
7676    const ID: u32 = 277u32;
7677    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7678    const EXTRA_CRC: u8 = 62u8;
7679    const ENCODED_LEN: usize = 30usize;
7680    fn deser(
7681        _version: MavlinkVersion,
7682        __input: &[u8],
7683    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7684        let avail_len = __input.len();
7685        let mut payload_buf = [0; Self::ENCODED_LEN];
7686        let mut buf = if avail_len < Self::ENCODED_LEN {
7687            payload_buf[0..avail_len].copy_from_slice(__input);
7688            Bytes::new(&payload_buf)
7689        } else {
7690            Bytes::new(__input)
7691        };
7692        let mut __struct = Self::default();
7693        __struct.time_boot_ms = buf.get_u32_le();
7694        __struct.max = buf.get_f32_le();
7695        __struct.max_point_x = buf.get_f32_le();
7696        __struct.max_point_y = buf.get_f32_le();
7697        __struct.min = buf.get_f32_le();
7698        __struct.min_point_x = buf.get_f32_le();
7699        __struct.min_point_y = buf.get_f32_le();
7700        __struct.stream_id = buf.get_u8();
7701        __struct.camera_device_id = buf.get_u8();
7702        Ok(__struct)
7703    }
7704    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7705        let mut __tmp = BytesMut::new(bytes);
7706        #[allow(clippy::absurd_extreme_comparisons)]
7707        #[allow(unused_comparisons)]
7708        if __tmp.remaining() < Self::ENCODED_LEN {
7709            panic!(
7710                "buffer is too small (need {} bytes, but got {})",
7711                Self::ENCODED_LEN,
7712                __tmp.remaining(),
7713            )
7714        }
7715        __tmp.put_u32_le(self.time_boot_ms);
7716        __tmp.put_f32_le(self.max);
7717        __tmp.put_f32_le(self.max_point_x);
7718        __tmp.put_f32_le(self.max_point_y);
7719        __tmp.put_f32_le(self.min);
7720        __tmp.put_f32_le(self.min_point_x);
7721        __tmp.put_f32_le(self.min_point_y);
7722        __tmp.put_u8(self.stream_id);
7723        __tmp.put_u8(self.camera_device_id);
7724        if matches!(version, MavlinkVersion::V2) {
7725            let len = __tmp.len();
7726            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7727        } else {
7728            __tmp.len()
7729        }
7730    }
7731}
7732#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7733#[doc = ""]
7734#[doc = "ID: 276"]
7735#[derive(Debug, Clone, PartialEq)]
7736#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7738#[cfg_attr(feature = "ts", derive(TS))]
7739#[cfg_attr(feature = "ts", ts(export))]
7740pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7741    #[doc = "Latitude of tracked object"]
7742    pub lat: i32,
7743    #[doc = "Longitude of tracked object"]
7744    pub lon: i32,
7745    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7746    pub alt: f32,
7747    #[doc = "Horizontal accuracy. NAN if unknown"]
7748    pub h_acc: f32,
7749    #[doc = "Vertical accuracy. NAN if unknown"]
7750    pub v_acc: f32,
7751    #[doc = "North velocity of tracked object. NAN if unknown"]
7752    pub vel_n: f32,
7753    #[doc = "East velocity of tracked object. NAN if unknown"]
7754    pub vel_e: f32,
7755    #[doc = "Down velocity of tracked object. NAN if unknown"]
7756    pub vel_d: f32,
7757    #[doc = "Velocity accuracy. NAN if unknown"]
7758    pub vel_acc: f32,
7759    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7760    pub dist: f32,
7761    #[doc = "Heading in radians, in NED. NAN if unknown"]
7762    pub hdg: f32,
7763    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7764    pub hdg_acc: f32,
7765    #[doc = "Current tracking status"]
7766    pub tracking_status: CameraTrackingStatusFlags,
7767    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7768    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7769    pub camera_device_id: u8,
7770}
7771impl CAMERA_TRACKING_GEO_STATUS_DATA {
7772    pub const ENCODED_LEN: usize = 50usize;
7773    pub const DEFAULT: Self = Self {
7774        lat: 0_i32,
7775        lon: 0_i32,
7776        alt: 0.0_f32,
7777        h_acc: 0.0_f32,
7778        v_acc: 0.0_f32,
7779        vel_n: 0.0_f32,
7780        vel_e: 0.0_f32,
7781        vel_d: 0.0_f32,
7782        vel_acc: 0.0_f32,
7783        dist: 0.0_f32,
7784        hdg: 0.0_f32,
7785        hdg_acc: 0.0_f32,
7786        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7787        camera_device_id: 0_u8,
7788    };
7789    #[cfg(feature = "arbitrary")]
7790    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7791        use arbitrary::{Arbitrary, Unstructured};
7792        let mut buf = [0u8; 1024];
7793        rng.fill_bytes(&mut buf);
7794        let mut unstructured = Unstructured::new(&buf);
7795        Self::arbitrary(&mut unstructured).unwrap_or_default()
7796    }
7797}
7798impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7799    fn default() -> Self {
7800        Self::DEFAULT.clone()
7801    }
7802}
7803impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7804    type Message = MavMessage;
7805    const ID: u32 = 276u32;
7806    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7807    const EXTRA_CRC: u8 = 18u8;
7808    const ENCODED_LEN: usize = 50usize;
7809    fn deser(
7810        _version: MavlinkVersion,
7811        __input: &[u8],
7812    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7813        let avail_len = __input.len();
7814        let mut payload_buf = [0; Self::ENCODED_LEN];
7815        let mut buf = if avail_len < Self::ENCODED_LEN {
7816            payload_buf[0..avail_len].copy_from_slice(__input);
7817            Bytes::new(&payload_buf)
7818        } else {
7819            Bytes::new(__input)
7820        };
7821        let mut __struct = Self::default();
7822        __struct.lat = buf.get_i32_le();
7823        __struct.lon = buf.get_i32_le();
7824        __struct.alt = buf.get_f32_le();
7825        __struct.h_acc = buf.get_f32_le();
7826        __struct.v_acc = buf.get_f32_le();
7827        __struct.vel_n = buf.get_f32_le();
7828        __struct.vel_e = buf.get_f32_le();
7829        __struct.vel_d = buf.get_f32_le();
7830        __struct.vel_acc = buf.get_f32_le();
7831        __struct.dist = buf.get_f32_le();
7832        __struct.hdg = buf.get_f32_le();
7833        __struct.hdg_acc = buf.get_f32_le();
7834        let tmp = buf.get_u8();
7835        __struct.tracking_status =
7836            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7837                enum_type: "CameraTrackingStatusFlags",
7838                value: tmp as u32,
7839            })?;
7840        __struct.camera_device_id = buf.get_u8();
7841        Ok(__struct)
7842    }
7843    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7844        let mut __tmp = BytesMut::new(bytes);
7845        #[allow(clippy::absurd_extreme_comparisons)]
7846        #[allow(unused_comparisons)]
7847        if __tmp.remaining() < Self::ENCODED_LEN {
7848            panic!(
7849                "buffer is too small (need {} bytes, but got {})",
7850                Self::ENCODED_LEN,
7851                __tmp.remaining(),
7852            )
7853        }
7854        __tmp.put_i32_le(self.lat);
7855        __tmp.put_i32_le(self.lon);
7856        __tmp.put_f32_le(self.alt);
7857        __tmp.put_f32_le(self.h_acc);
7858        __tmp.put_f32_le(self.v_acc);
7859        __tmp.put_f32_le(self.vel_n);
7860        __tmp.put_f32_le(self.vel_e);
7861        __tmp.put_f32_le(self.vel_d);
7862        __tmp.put_f32_le(self.vel_acc);
7863        __tmp.put_f32_le(self.dist);
7864        __tmp.put_f32_le(self.hdg);
7865        __tmp.put_f32_le(self.hdg_acc);
7866        __tmp.put_u8(self.tracking_status as u8);
7867        if matches!(version, MavlinkVersion::V2) {
7868            __tmp.put_u8(self.camera_device_id);
7869            let len = __tmp.len();
7870            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7871        } else {
7872            __tmp.len()
7873        }
7874    }
7875}
7876#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7877#[doc = ""]
7878#[doc = "ID: 275"]
7879#[derive(Debug, Clone, PartialEq)]
7880#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7881#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7882#[cfg_attr(feature = "ts", derive(TS))]
7883#[cfg_attr(feature = "ts", ts(export))]
7884pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7885    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7886    pub point_x: f32,
7887    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7888    pub point_y: f32,
7889    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7890    pub radius: f32,
7891    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7892    pub rec_top_x: f32,
7893    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7894    pub rec_top_y: f32,
7895    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7896    pub rec_bottom_x: f32,
7897    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7898    pub rec_bottom_y: f32,
7899    #[doc = "Current tracking status"]
7900    pub tracking_status: CameraTrackingStatusFlags,
7901    #[doc = "Current tracking mode"]
7902    pub tracking_mode: CameraTrackingMode,
7903    #[doc = "Defines location of target data"]
7904    pub target_data: CameraTrackingTargetData,
7905    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7906    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7907    pub camera_device_id: u8,
7908}
7909impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7910    pub const ENCODED_LEN: usize = 32usize;
7911    pub const DEFAULT: Self = Self {
7912        point_x: 0.0_f32,
7913        point_y: 0.0_f32,
7914        radius: 0.0_f32,
7915        rec_top_x: 0.0_f32,
7916        rec_top_y: 0.0_f32,
7917        rec_bottom_x: 0.0_f32,
7918        rec_bottom_y: 0.0_f32,
7919        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7920        tracking_mode: CameraTrackingMode::DEFAULT,
7921        target_data: CameraTrackingTargetData::DEFAULT,
7922        camera_device_id: 0_u8,
7923    };
7924    #[cfg(feature = "arbitrary")]
7925    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7926        use arbitrary::{Arbitrary, Unstructured};
7927        let mut buf = [0u8; 1024];
7928        rng.fill_bytes(&mut buf);
7929        let mut unstructured = Unstructured::new(&buf);
7930        Self::arbitrary(&mut unstructured).unwrap_or_default()
7931    }
7932}
7933impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7934    fn default() -> Self {
7935        Self::DEFAULT.clone()
7936    }
7937}
7938impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7939    type Message = MavMessage;
7940    const ID: u32 = 275u32;
7941    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7942    const EXTRA_CRC: u8 = 126u8;
7943    const ENCODED_LEN: usize = 32usize;
7944    fn deser(
7945        _version: MavlinkVersion,
7946        __input: &[u8],
7947    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7948        let avail_len = __input.len();
7949        let mut payload_buf = [0; Self::ENCODED_LEN];
7950        let mut buf = if avail_len < Self::ENCODED_LEN {
7951            payload_buf[0..avail_len].copy_from_slice(__input);
7952            Bytes::new(&payload_buf)
7953        } else {
7954            Bytes::new(__input)
7955        };
7956        let mut __struct = Self::default();
7957        __struct.point_x = buf.get_f32_le();
7958        __struct.point_y = buf.get_f32_le();
7959        __struct.radius = buf.get_f32_le();
7960        __struct.rec_top_x = buf.get_f32_le();
7961        __struct.rec_top_y = buf.get_f32_le();
7962        __struct.rec_bottom_x = buf.get_f32_le();
7963        __struct.rec_bottom_y = buf.get_f32_le();
7964        let tmp = buf.get_u8();
7965        __struct.tracking_status =
7966            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7967                enum_type: "CameraTrackingStatusFlags",
7968                value: tmp as u32,
7969            })?;
7970        let tmp = buf.get_u8();
7971        __struct.tracking_mode =
7972            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7973                enum_type: "CameraTrackingMode",
7974                value: tmp as u32,
7975            })?;
7976        let tmp = buf.get_u8();
7977        __struct.target_data =
7978            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
7979                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7980                    flag_type: "CameraTrackingTargetData",
7981                    value: tmp as u32,
7982                })?;
7983        __struct.camera_device_id = buf.get_u8();
7984        Ok(__struct)
7985    }
7986    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7987        let mut __tmp = BytesMut::new(bytes);
7988        #[allow(clippy::absurd_extreme_comparisons)]
7989        #[allow(unused_comparisons)]
7990        if __tmp.remaining() < Self::ENCODED_LEN {
7991            panic!(
7992                "buffer is too small (need {} bytes, but got {})",
7993                Self::ENCODED_LEN,
7994                __tmp.remaining(),
7995            )
7996        }
7997        __tmp.put_f32_le(self.point_x);
7998        __tmp.put_f32_le(self.point_y);
7999        __tmp.put_f32_le(self.radius);
8000        __tmp.put_f32_le(self.rec_top_x);
8001        __tmp.put_f32_le(self.rec_top_y);
8002        __tmp.put_f32_le(self.rec_bottom_x);
8003        __tmp.put_f32_le(self.rec_bottom_y);
8004        __tmp.put_u8(self.tracking_status as u8);
8005        __tmp.put_u8(self.tracking_mode as u8);
8006        __tmp.put_u8(self.target_data.bits());
8007        if matches!(version, MavlinkVersion::V2) {
8008            __tmp.put_u8(self.camera_device_id);
8009            let len = __tmp.len();
8010            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8011        } else {
8012            __tmp.len()
8013        }
8014    }
8015}
8016#[doc = "Camera-IMU triggering and synchronisation message."]
8017#[doc = ""]
8018#[doc = "ID: 112"]
8019#[derive(Debug, Clone, PartialEq)]
8020#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8021#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8022#[cfg_attr(feature = "ts", derive(TS))]
8023#[cfg_attr(feature = "ts", ts(export))]
8024pub struct CAMERA_TRIGGER_DATA {
8025    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8026    pub time_usec: u64,
8027    #[doc = "Image frame sequence"]
8028    pub seq: u32,
8029}
8030impl CAMERA_TRIGGER_DATA {
8031    pub const ENCODED_LEN: usize = 12usize;
8032    pub const DEFAULT: Self = Self {
8033        time_usec: 0_u64,
8034        seq: 0_u32,
8035    };
8036    #[cfg(feature = "arbitrary")]
8037    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8038        use arbitrary::{Arbitrary, Unstructured};
8039        let mut buf = [0u8; 1024];
8040        rng.fill_bytes(&mut buf);
8041        let mut unstructured = Unstructured::new(&buf);
8042        Self::arbitrary(&mut unstructured).unwrap_or_default()
8043    }
8044}
8045impl Default for CAMERA_TRIGGER_DATA {
8046    fn default() -> Self {
8047        Self::DEFAULT.clone()
8048    }
8049}
8050impl MessageData for CAMERA_TRIGGER_DATA {
8051    type Message = MavMessage;
8052    const ID: u32 = 112u32;
8053    const NAME: &'static str = "CAMERA_TRIGGER";
8054    const EXTRA_CRC: u8 = 174u8;
8055    const ENCODED_LEN: usize = 12usize;
8056    fn deser(
8057        _version: MavlinkVersion,
8058        __input: &[u8],
8059    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8060        let avail_len = __input.len();
8061        let mut payload_buf = [0; Self::ENCODED_LEN];
8062        let mut buf = if avail_len < Self::ENCODED_LEN {
8063            payload_buf[0..avail_len].copy_from_slice(__input);
8064            Bytes::new(&payload_buf)
8065        } else {
8066            Bytes::new(__input)
8067        };
8068        let mut __struct = Self::default();
8069        __struct.time_usec = buf.get_u64_le();
8070        __struct.seq = buf.get_u32_le();
8071        Ok(__struct)
8072    }
8073    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8074        let mut __tmp = BytesMut::new(bytes);
8075        #[allow(clippy::absurd_extreme_comparisons)]
8076        #[allow(unused_comparisons)]
8077        if __tmp.remaining() < Self::ENCODED_LEN {
8078            panic!(
8079                "buffer is too small (need {} bytes, but got {})",
8080                Self::ENCODED_LEN,
8081                __tmp.remaining(),
8082            )
8083        }
8084        __tmp.put_u64_le(self.time_usec);
8085        __tmp.put_u32_le(self.seq);
8086        if matches!(version, MavlinkVersion::V2) {
8087            let len = __tmp.len();
8088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8089        } else {
8090            __tmp.len()
8091        }
8092    }
8093}
8094#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8095#[doc = ""]
8096#[doc = "ID: 387"]
8097#[derive(Debug, Clone, PartialEq)]
8098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8100#[cfg_attr(feature = "ts", derive(TS))]
8101#[cfg_attr(feature = "ts", ts(export))]
8102pub struct CANFD_FRAME_DATA {
8103    #[doc = "Frame ID"]
8104    pub id: u32,
8105    #[doc = "System ID."]
8106    pub target_system: u8,
8107    #[doc = "Component ID."]
8108    pub target_component: u8,
8109    #[doc = "bus number"]
8110    pub bus: u8,
8111    #[doc = "Frame length"]
8112    pub len: u8,
8113    #[doc = "Frame data"]
8114    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8115    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8116    pub data: [u8; 64],
8117}
8118impl CANFD_FRAME_DATA {
8119    pub const ENCODED_LEN: usize = 72usize;
8120    pub const DEFAULT: Self = Self {
8121        id: 0_u32,
8122        target_system: 0_u8,
8123        target_component: 0_u8,
8124        bus: 0_u8,
8125        len: 0_u8,
8126        data: [0_u8; 64usize],
8127    };
8128    #[cfg(feature = "arbitrary")]
8129    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8130        use arbitrary::{Arbitrary, Unstructured};
8131        let mut buf = [0u8; 1024];
8132        rng.fill_bytes(&mut buf);
8133        let mut unstructured = Unstructured::new(&buf);
8134        Self::arbitrary(&mut unstructured).unwrap_or_default()
8135    }
8136}
8137impl Default for CANFD_FRAME_DATA {
8138    fn default() -> Self {
8139        Self::DEFAULT.clone()
8140    }
8141}
8142impl MessageData for CANFD_FRAME_DATA {
8143    type Message = MavMessage;
8144    const ID: u32 = 387u32;
8145    const NAME: &'static str = "CANFD_FRAME";
8146    const EXTRA_CRC: u8 = 4u8;
8147    const ENCODED_LEN: usize = 72usize;
8148    fn deser(
8149        _version: MavlinkVersion,
8150        __input: &[u8],
8151    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8152        let avail_len = __input.len();
8153        let mut payload_buf = [0; Self::ENCODED_LEN];
8154        let mut buf = if avail_len < Self::ENCODED_LEN {
8155            payload_buf[0..avail_len].copy_from_slice(__input);
8156            Bytes::new(&payload_buf)
8157        } else {
8158            Bytes::new(__input)
8159        };
8160        let mut __struct = Self::default();
8161        __struct.id = buf.get_u32_le();
8162        __struct.target_system = buf.get_u8();
8163        __struct.target_component = buf.get_u8();
8164        __struct.bus = buf.get_u8();
8165        __struct.len = buf.get_u8();
8166        for v in &mut __struct.data {
8167            let val = buf.get_u8();
8168            *v = val;
8169        }
8170        Ok(__struct)
8171    }
8172    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8173        let mut __tmp = BytesMut::new(bytes);
8174        #[allow(clippy::absurd_extreme_comparisons)]
8175        #[allow(unused_comparisons)]
8176        if __tmp.remaining() < Self::ENCODED_LEN {
8177            panic!(
8178                "buffer is too small (need {} bytes, but got {})",
8179                Self::ENCODED_LEN,
8180                __tmp.remaining(),
8181            )
8182        }
8183        __tmp.put_u32_le(self.id);
8184        __tmp.put_u8(self.target_system);
8185        __tmp.put_u8(self.target_component);
8186        __tmp.put_u8(self.bus);
8187        __tmp.put_u8(self.len);
8188        for val in &self.data {
8189            __tmp.put_u8(*val);
8190        }
8191        if matches!(version, MavlinkVersion::V2) {
8192            let len = __tmp.len();
8193            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8194        } else {
8195            __tmp.len()
8196        }
8197    }
8198}
8199#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8200#[doc = ""]
8201#[doc = "ID: 388"]
8202#[derive(Debug, Clone, PartialEq)]
8203#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8204#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8205#[cfg_attr(feature = "ts", derive(TS))]
8206#[cfg_attr(feature = "ts", ts(export))]
8207pub struct CAN_FILTER_MODIFY_DATA {
8208    #[doc = "filter IDs, length num_ids"]
8209    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8210    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8211    pub ids: [u16; 16],
8212    #[doc = "System ID."]
8213    pub target_system: u8,
8214    #[doc = "Component ID."]
8215    pub target_component: u8,
8216    #[doc = "bus number"]
8217    pub bus: u8,
8218    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8219    pub operation: CanFilterOp,
8220    #[doc = "number of IDs in filter list"]
8221    pub num_ids: u8,
8222}
8223impl CAN_FILTER_MODIFY_DATA {
8224    pub const ENCODED_LEN: usize = 37usize;
8225    pub const DEFAULT: Self = Self {
8226        ids: [0_u16; 16usize],
8227        target_system: 0_u8,
8228        target_component: 0_u8,
8229        bus: 0_u8,
8230        operation: CanFilterOp::DEFAULT,
8231        num_ids: 0_u8,
8232    };
8233    #[cfg(feature = "arbitrary")]
8234    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8235        use arbitrary::{Arbitrary, Unstructured};
8236        let mut buf = [0u8; 1024];
8237        rng.fill_bytes(&mut buf);
8238        let mut unstructured = Unstructured::new(&buf);
8239        Self::arbitrary(&mut unstructured).unwrap_or_default()
8240    }
8241}
8242impl Default for CAN_FILTER_MODIFY_DATA {
8243    fn default() -> Self {
8244        Self::DEFAULT.clone()
8245    }
8246}
8247impl MessageData for CAN_FILTER_MODIFY_DATA {
8248    type Message = MavMessage;
8249    const ID: u32 = 388u32;
8250    const NAME: &'static str = "CAN_FILTER_MODIFY";
8251    const EXTRA_CRC: u8 = 8u8;
8252    const ENCODED_LEN: usize = 37usize;
8253    fn deser(
8254        _version: MavlinkVersion,
8255        __input: &[u8],
8256    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8257        let avail_len = __input.len();
8258        let mut payload_buf = [0; Self::ENCODED_LEN];
8259        let mut buf = if avail_len < Self::ENCODED_LEN {
8260            payload_buf[0..avail_len].copy_from_slice(__input);
8261            Bytes::new(&payload_buf)
8262        } else {
8263            Bytes::new(__input)
8264        };
8265        let mut __struct = Self::default();
8266        for v in &mut __struct.ids {
8267            let val = buf.get_u16_le();
8268            *v = val;
8269        }
8270        __struct.target_system = buf.get_u8();
8271        __struct.target_component = buf.get_u8();
8272        __struct.bus = buf.get_u8();
8273        let tmp = buf.get_u8();
8274        __struct.operation =
8275            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8276                enum_type: "CanFilterOp",
8277                value: tmp as u32,
8278            })?;
8279        __struct.num_ids = buf.get_u8();
8280        Ok(__struct)
8281    }
8282    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8283        let mut __tmp = BytesMut::new(bytes);
8284        #[allow(clippy::absurd_extreme_comparisons)]
8285        #[allow(unused_comparisons)]
8286        if __tmp.remaining() < Self::ENCODED_LEN {
8287            panic!(
8288                "buffer is too small (need {} bytes, but got {})",
8289                Self::ENCODED_LEN,
8290                __tmp.remaining(),
8291            )
8292        }
8293        for val in &self.ids {
8294            __tmp.put_u16_le(*val);
8295        }
8296        __tmp.put_u8(self.target_system);
8297        __tmp.put_u8(self.target_component);
8298        __tmp.put_u8(self.bus);
8299        __tmp.put_u8(self.operation as u8);
8300        __tmp.put_u8(self.num_ids);
8301        if matches!(version, MavlinkVersion::V2) {
8302            let len = __tmp.len();
8303            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8304        } else {
8305            __tmp.len()
8306        }
8307    }
8308}
8309#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8310#[doc = ""]
8311#[doc = "ID: 386"]
8312#[derive(Debug, Clone, PartialEq)]
8313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8314#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8315#[cfg_attr(feature = "ts", derive(TS))]
8316#[cfg_attr(feature = "ts", ts(export))]
8317pub struct CAN_FRAME_DATA {
8318    #[doc = "Frame ID"]
8319    pub id: u32,
8320    #[doc = "System ID."]
8321    pub target_system: u8,
8322    #[doc = "Component ID."]
8323    pub target_component: u8,
8324    #[doc = "Bus number"]
8325    pub bus: u8,
8326    #[doc = "Frame length"]
8327    pub len: u8,
8328    #[doc = "Frame data"]
8329    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8330    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8331    pub data: [u8; 8],
8332}
8333impl CAN_FRAME_DATA {
8334    pub const ENCODED_LEN: usize = 16usize;
8335    pub const DEFAULT: Self = Self {
8336        id: 0_u32,
8337        target_system: 0_u8,
8338        target_component: 0_u8,
8339        bus: 0_u8,
8340        len: 0_u8,
8341        data: [0_u8; 8usize],
8342    };
8343    #[cfg(feature = "arbitrary")]
8344    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8345        use arbitrary::{Arbitrary, Unstructured};
8346        let mut buf = [0u8; 1024];
8347        rng.fill_bytes(&mut buf);
8348        let mut unstructured = Unstructured::new(&buf);
8349        Self::arbitrary(&mut unstructured).unwrap_or_default()
8350    }
8351}
8352impl Default for CAN_FRAME_DATA {
8353    fn default() -> Self {
8354        Self::DEFAULT.clone()
8355    }
8356}
8357impl MessageData for CAN_FRAME_DATA {
8358    type Message = MavMessage;
8359    const ID: u32 = 386u32;
8360    const NAME: &'static str = "CAN_FRAME";
8361    const EXTRA_CRC: u8 = 132u8;
8362    const ENCODED_LEN: usize = 16usize;
8363    fn deser(
8364        _version: MavlinkVersion,
8365        __input: &[u8],
8366    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8367        let avail_len = __input.len();
8368        let mut payload_buf = [0; Self::ENCODED_LEN];
8369        let mut buf = if avail_len < Self::ENCODED_LEN {
8370            payload_buf[0..avail_len].copy_from_slice(__input);
8371            Bytes::new(&payload_buf)
8372        } else {
8373            Bytes::new(__input)
8374        };
8375        let mut __struct = Self::default();
8376        __struct.id = buf.get_u32_le();
8377        __struct.target_system = buf.get_u8();
8378        __struct.target_component = buf.get_u8();
8379        __struct.bus = buf.get_u8();
8380        __struct.len = buf.get_u8();
8381        for v in &mut __struct.data {
8382            let val = buf.get_u8();
8383            *v = val;
8384        }
8385        Ok(__struct)
8386    }
8387    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8388        let mut __tmp = BytesMut::new(bytes);
8389        #[allow(clippy::absurd_extreme_comparisons)]
8390        #[allow(unused_comparisons)]
8391        if __tmp.remaining() < Self::ENCODED_LEN {
8392            panic!(
8393                "buffer is too small (need {} bytes, but got {})",
8394                Self::ENCODED_LEN,
8395                __tmp.remaining(),
8396            )
8397        }
8398        __tmp.put_u32_le(self.id);
8399        __tmp.put_u8(self.target_system);
8400        __tmp.put_u8(self.target_component);
8401        __tmp.put_u8(self.bus);
8402        __tmp.put_u8(self.len);
8403        for val in &self.data {
8404            __tmp.put_u8(*val);
8405        }
8406        if matches!(version, MavlinkVersion::V2) {
8407            let len = __tmp.len();
8408            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8409        } else {
8410            __tmp.len()
8411        }
8412    }
8413}
8414#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8415#[doc = ""]
8416#[doc = "ID: 336"]
8417#[derive(Debug, Clone, PartialEq)]
8418#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8419#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8420#[cfg_attr(feature = "ts", derive(TS))]
8421#[cfg_attr(feature = "ts", ts(export))]
8422pub struct CELLULAR_CONFIG_DATA {
8423    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8424    pub enable_lte: u8,
8425    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8426    pub enable_pin: u8,
8427    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8428    #[cfg_attr(
8429        feature = "serde",
8430        serde(
8431            serialize_with = "crate::nulstr::serialize::<_, 16>",
8432            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
8433        )
8434    )]
8435    #[cfg_attr(feature = "ts", ts(type = "string"))]
8436    pub pin: [u8; 16],
8437    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8438    #[cfg_attr(
8439        feature = "serde",
8440        serde(
8441            serialize_with = "crate::nulstr::serialize::<_, 16>",
8442            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
8443        )
8444    )]
8445    #[cfg_attr(feature = "ts", ts(type = "string"))]
8446    pub new_pin: [u8; 16],
8447    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8448    #[cfg_attr(
8449        feature = "serde",
8450        serde(
8451            serialize_with = "crate::nulstr::serialize::<_, 32>",
8452            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
8453        )
8454    )]
8455    #[cfg_attr(feature = "ts", ts(type = "string"))]
8456    pub apn: [u8; 32],
8457    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8458    #[cfg_attr(
8459        feature = "serde",
8460        serde(
8461            serialize_with = "crate::nulstr::serialize::<_, 16>",
8462            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
8463        )
8464    )]
8465    #[cfg_attr(feature = "ts", ts(type = "string"))]
8466    pub puk: [u8; 16],
8467    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8468    pub roaming: u8,
8469    #[doc = "Message acceptance response (sent back to GS)."]
8470    pub response: CellularConfigResponse,
8471}
8472impl CELLULAR_CONFIG_DATA {
8473    pub const ENCODED_LEN: usize = 84usize;
8474    pub const DEFAULT: Self = Self {
8475        enable_lte: 0_u8,
8476        enable_pin: 0_u8,
8477        pin: [0_u8; 16usize],
8478        new_pin: [0_u8; 16usize],
8479        apn: [0_u8; 32usize],
8480        puk: [0_u8; 16usize],
8481        roaming: 0_u8,
8482        response: CellularConfigResponse::DEFAULT,
8483    };
8484    #[cfg(feature = "arbitrary")]
8485    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8486        use arbitrary::{Arbitrary, Unstructured};
8487        let mut buf = [0u8; 1024];
8488        rng.fill_bytes(&mut buf);
8489        let mut unstructured = Unstructured::new(&buf);
8490        Self::arbitrary(&mut unstructured).unwrap_or_default()
8491    }
8492}
8493impl Default for CELLULAR_CONFIG_DATA {
8494    fn default() -> Self {
8495        Self::DEFAULT.clone()
8496    }
8497}
8498impl MessageData for CELLULAR_CONFIG_DATA {
8499    type Message = MavMessage;
8500    const ID: u32 = 336u32;
8501    const NAME: &'static str = "CELLULAR_CONFIG";
8502    const EXTRA_CRC: u8 = 245u8;
8503    const ENCODED_LEN: usize = 84usize;
8504    fn deser(
8505        _version: MavlinkVersion,
8506        __input: &[u8],
8507    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8508        let avail_len = __input.len();
8509        let mut payload_buf = [0; Self::ENCODED_LEN];
8510        let mut buf = if avail_len < Self::ENCODED_LEN {
8511            payload_buf[0..avail_len].copy_from_slice(__input);
8512            Bytes::new(&payload_buf)
8513        } else {
8514            Bytes::new(__input)
8515        };
8516        let mut __struct = Self::default();
8517        __struct.enable_lte = buf.get_u8();
8518        __struct.enable_pin = buf.get_u8();
8519        for v in &mut __struct.pin {
8520            let val = buf.get_u8();
8521            *v = val;
8522        }
8523        for v in &mut __struct.new_pin {
8524            let val = buf.get_u8();
8525            *v = val;
8526        }
8527        for v in &mut __struct.apn {
8528            let val = buf.get_u8();
8529            *v = val;
8530        }
8531        for v in &mut __struct.puk {
8532            let val = buf.get_u8();
8533            *v = val;
8534        }
8535        __struct.roaming = buf.get_u8();
8536        let tmp = buf.get_u8();
8537        __struct.response =
8538            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8539                enum_type: "CellularConfigResponse",
8540                value: tmp as u32,
8541            })?;
8542        Ok(__struct)
8543    }
8544    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8545        let mut __tmp = BytesMut::new(bytes);
8546        #[allow(clippy::absurd_extreme_comparisons)]
8547        #[allow(unused_comparisons)]
8548        if __tmp.remaining() < Self::ENCODED_LEN {
8549            panic!(
8550                "buffer is too small (need {} bytes, but got {})",
8551                Self::ENCODED_LEN,
8552                __tmp.remaining(),
8553            )
8554        }
8555        __tmp.put_u8(self.enable_lte);
8556        __tmp.put_u8(self.enable_pin);
8557        for val in &self.pin {
8558            __tmp.put_u8(*val);
8559        }
8560        for val in &self.new_pin {
8561            __tmp.put_u8(*val);
8562        }
8563        for val in &self.apn {
8564            __tmp.put_u8(*val);
8565        }
8566        for val in &self.puk {
8567            __tmp.put_u8(*val);
8568        }
8569        __tmp.put_u8(self.roaming);
8570        __tmp.put_u8(self.response as u8);
8571        if matches!(version, MavlinkVersion::V2) {
8572            let len = __tmp.len();
8573            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8574        } else {
8575            __tmp.len()
8576        }
8577    }
8578}
8579#[doc = "Report current used cellular network status."]
8580#[doc = ""]
8581#[doc = "ID: 334"]
8582#[derive(Debug, Clone, PartialEq)]
8583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8585#[cfg_attr(feature = "ts", derive(TS))]
8586#[cfg_attr(feature = "ts", ts(export))]
8587pub struct CELLULAR_STATUS_DATA {
8588    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8589    pub mcc: u16,
8590    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8591    pub mnc: u16,
8592    #[doc = "Location area code. If unknown, set to 0"]
8593    pub lac: u16,
8594    #[doc = "Cellular modem status"]
8595    pub status: CellularStatusFlag,
8596    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8597    pub failure_reason: CellularNetworkFailedReason,
8598    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8599    pub mavtype: CellularNetworkRadioType,
8600    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8601    pub quality: u8,
8602}
8603impl CELLULAR_STATUS_DATA {
8604    pub const ENCODED_LEN: usize = 10usize;
8605    pub const DEFAULT: Self = Self {
8606        mcc: 0_u16,
8607        mnc: 0_u16,
8608        lac: 0_u16,
8609        status: CellularStatusFlag::DEFAULT,
8610        failure_reason: CellularNetworkFailedReason::DEFAULT,
8611        mavtype: CellularNetworkRadioType::DEFAULT,
8612        quality: 0_u8,
8613    };
8614    #[cfg(feature = "arbitrary")]
8615    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8616        use arbitrary::{Arbitrary, Unstructured};
8617        let mut buf = [0u8; 1024];
8618        rng.fill_bytes(&mut buf);
8619        let mut unstructured = Unstructured::new(&buf);
8620        Self::arbitrary(&mut unstructured).unwrap_or_default()
8621    }
8622}
8623impl Default for CELLULAR_STATUS_DATA {
8624    fn default() -> Self {
8625        Self::DEFAULT.clone()
8626    }
8627}
8628impl MessageData for CELLULAR_STATUS_DATA {
8629    type Message = MavMessage;
8630    const ID: u32 = 334u32;
8631    const NAME: &'static str = "CELLULAR_STATUS";
8632    const EXTRA_CRC: u8 = 72u8;
8633    const ENCODED_LEN: usize = 10usize;
8634    fn deser(
8635        _version: MavlinkVersion,
8636        __input: &[u8],
8637    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8638        let avail_len = __input.len();
8639        let mut payload_buf = [0; Self::ENCODED_LEN];
8640        let mut buf = if avail_len < Self::ENCODED_LEN {
8641            payload_buf[0..avail_len].copy_from_slice(__input);
8642            Bytes::new(&payload_buf)
8643        } else {
8644            Bytes::new(__input)
8645        };
8646        let mut __struct = Self::default();
8647        __struct.mcc = buf.get_u16_le();
8648        __struct.mnc = buf.get_u16_le();
8649        __struct.lac = buf.get_u16_le();
8650        let tmp = buf.get_u8();
8651        __struct.status =
8652            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8653                enum_type: "CellularStatusFlag",
8654                value: tmp as u32,
8655            })?;
8656        let tmp = buf.get_u8();
8657        __struct.failure_reason =
8658            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8659                enum_type: "CellularNetworkFailedReason",
8660                value: tmp as u32,
8661            })?;
8662        let tmp = buf.get_u8();
8663        __struct.mavtype =
8664            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8665                enum_type: "CellularNetworkRadioType",
8666                value: tmp as u32,
8667            })?;
8668        __struct.quality = buf.get_u8();
8669        Ok(__struct)
8670    }
8671    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8672        let mut __tmp = BytesMut::new(bytes);
8673        #[allow(clippy::absurd_extreme_comparisons)]
8674        #[allow(unused_comparisons)]
8675        if __tmp.remaining() < Self::ENCODED_LEN {
8676            panic!(
8677                "buffer is too small (need {} bytes, but got {})",
8678                Self::ENCODED_LEN,
8679                __tmp.remaining(),
8680            )
8681        }
8682        __tmp.put_u16_le(self.mcc);
8683        __tmp.put_u16_le(self.mnc);
8684        __tmp.put_u16_le(self.lac);
8685        __tmp.put_u8(self.status as u8);
8686        __tmp.put_u8(self.failure_reason as u8);
8687        __tmp.put_u8(self.mavtype as u8);
8688        __tmp.put_u8(self.quality);
8689        if matches!(version, MavlinkVersion::V2) {
8690            let len = __tmp.len();
8691            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8692        } else {
8693            __tmp.len()
8694        }
8695    }
8696}
8697#[doc = "Request to control this MAV."]
8698#[doc = ""]
8699#[doc = "ID: 5"]
8700#[derive(Debug, Clone, PartialEq)]
8701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8703#[cfg_attr(feature = "ts", derive(TS))]
8704#[cfg_attr(feature = "ts", ts(export))]
8705pub struct CHANGE_OPERATOR_CONTROL_DATA {
8706    #[doc = "System the GCS requests control for"]
8707    pub target_system: u8,
8708    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8709    pub control_request: u8,
8710    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8711    pub version: u8,
8712    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8713    #[cfg_attr(
8714        feature = "serde",
8715        serde(
8716            serialize_with = "crate::nulstr::serialize::<_, 25>",
8717            deserialize_with = "crate::nulstr::deserialize::<_, 25>"
8718        )
8719    )]
8720    #[cfg_attr(feature = "ts", ts(type = "string"))]
8721    pub passkey: [u8; 25],
8722}
8723impl CHANGE_OPERATOR_CONTROL_DATA {
8724    pub const ENCODED_LEN: usize = 28usize;
8725    pub const DEFAULT: Self = Self {
8726        target_system: 0_u8,
8727        control_request: 0_u8,
8728        version: 0_u8,
8729        passkey: [0_u8; 25usize],
8730    };
8731    #[cfg(feature = "arbitrary")]
8732    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8733        use arbitrary::{Arbitrary, Unstructured};
8734        let mut buf = [0u8; 1024];
8735        rng.fill_bytes(&mut buf);
8736        let mut unstructured = Unstructured::new(&buf);
8737        Self::arbitrary(&mut unstructured).unwrap_or_default()
8738    }
8739}
8740impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8741    fn default() -> Self {
8742        Self::DEFAULT.clone()
8743    }
8744}
8745impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8746    type Message = MavMessage;
8747    const ID: u32 = 5u32;
8748    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8749    const EXTRA_CRC: u8 = 217u8;
8750    const ENCODED_LEN: usize = 28usize;
8751    fn deser(
8752        _version: MavlinkVersion,
8753        __input: &[u8],
8754    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8755        let avail_len = __input.len();
8756        let mut payload_buf = [0; Self::ENCODED_LEN];
8757        let mut buf = if avail_len < Self::ENCODED_LEN {
8758            payload_buf[0..avail_len].copy_from_slice(__input);
8759            Bytes::new(&payload_buf)
8760        } else {
8761            Bytes::new(__input)
8762        };
8763        let mut __struct = Self::default();
8764        __struct.target_system = buf.get_u8();
8765        __struct.control_request = buf.get_u8();
8766        __struct.version = buf.get_u8();
8767        for v in &mut __struct.passkey {
8768            let val = buf.get_u8();
8769            *v = val;
8770        }
8771        Ok(__struct)
8772    }
8773    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8774        let mut __tmp = BytesMut::new(bytes);
8775        #[allow(clippy::absurd_extreme_comparisons)]
8776        #[allow(unused_comparisons)]
8777        if __tmp.remaining() < Self::ENCODED_LEN {
8778            panic!(
8779                "buffer is too small (need {} bytes, but got {})",
8780                Self::ENCODED_LEN,
8781                __tmp.remaining(),
8782            )
8783        }
8784        __tmp.put_u8(self.target_system);
8785        __tmp.put_u8(self.control_request);
8786        __tmp.put_u8(self.version);
8787        for val in &self.passkey {
8788            __tmp.put_u8(*val);
8789        }
8790        if matches!(version, MavlinkVersion::V2) {
8791            let len = __tmp.len();
8792            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8793        } else {
8794            __tmp.len()
8795        }
8796    }
8797}
8798#[doc = "Accept / deny control of this MAV."]
8799#[doc = ""]
8800#[doc = "ID: 6"]
8801#[derive(Debug, Clone, PartialEq)]
8802#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8803#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8804#[cfg_attr(feature = "ts", derive(TS))]
8805#[cfg_attr(feature = "ts", ts(export))]
8806pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8807    #[doc = "ID of the GCS this message"]
8808    pub gcs_system_id: u8,
8809    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8810    pub control_request: u8,
8811    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8812    pub ack: u8,
8813}
8814impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8815    pub const ENCODED_LEN: usize = 3usize;
8816    pub const DEFAULT: Self = Self {
8817        gcs_system_id: 0_u8,
8818        control_request: 0_u8,
8819        ack: 0_u8,
8820    };
8821    #[cfg(feature = "arbitrary")]
8822    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8823        use arbitrary::{Arbitrary, Unstructured};
8824        let mut buf = [0u8; 1024];
8825        rng.fill_bytes(&mut buf);
8826        let mut unstructured = Unstructured::new(&buf);
8827        Self::arbitrary(&mut unstructured).unwrap_or_default()
8828    }
8829}
8830impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8831    fn default() -> Self {
8832        Self::DEFAULT.clone()
8833    }
8834}
8835impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8836    type Message = MavMessage;
8837    const ID: u32 = 6u32;
8838    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8839    const EXTRA_CRC: u8 = 104u8;
8840    const ENCODED_LEN: usize = 3usize;
8841    fn deser(
8842        _version: MavlinkVersion,
8843        __input: &[u8],
8844    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8845        let avail_len = __input.len();
8846        let mut payload_buf = [0; Self::ENCODED_LEN];
8847        let mut buf = if avail_len < Self::ENCODED_LEN {
8848            payload_buf[0..avail_len].copy_from_slice(__input);
8849            Bytes::new(&payload_buf)
8850        } else {
8851            Bytes::new(__input)
8852        };
8853        let mut __struct = Self::default();
8854        __struct.gcs_system_id = buf.get_u8();
8855        __struct.control_request = buf.get_u8();
8856        __struct.ack = buf.get_u8();
8857        Ok(__struct)
8858    }
8859    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8860        let mut __tmp = BytesMut::new(bytes);
8861        #[allow(clippy::absurd_extreme_comparisons)]
8862        #[allow(unused_comparisons)]
8863        if __tmp.remaining() < Self::ENCODED_LEN {
8864            panic!(
8865                "buffer is too small (need {} bytes, but got {})",
8866                Self::ENCODED_LEN,
8867                __tmp.remaining(),
8868            )
8869        }
8870        __tmp.put_u8(self.gcs_system_id);
8871        __tmp.put_u8(self.control_request);
8872        __tmp.put_u8(self.ack);
8873        if matches!(version, MavlinkVersion::V2) {
8874            let len = __tmp.len();
8875            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8876        } else {
8877            __tmp.len()
8878        }
8879    }
8880}
8881#[doc = "Information about a potential collision."]
8882#[doc = ""]
8883#[doc = "ID: 247"]
8884#[derive(Debug, Clone, PartialEq)]
8885#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8886#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8887#[cfg_attr(feature = "ts", derive(TS))]
8888#[cfg_attr(feature = "ts", ts(export))]
8889pub struct COLLISION_DATA {
8890    #[doc = "Unique identifier, domain based on src field"]
8891    pub id: u32,
8892    #[doc = "Estimated time until collision occurs"]
8893    pub time_to_minimum_delta: f32,
8894    #[doc = "Closest vertical distance between vehicle and object"]
8895    pub altitude_minimum_delta: f32,
8896    #[doc = "Closest horizontal distance between vehicle and object"]
8897    pub horizontal_minimum_delta: f32,
8898    #[doc = "Collision data source"]
8899    pub src: MavCollisionSrc,
8900    #[doc = "Action that is being taken to avoid this collision"]
8901    pub action: MavCollisionAction,
8902    #[doc = "How concerned the aircraft is about this collision"]
8903    pub threat_level: MavCollisionThreatLevel,
8904}
8905impl COLLISION_DATA {
8906    pub const ENCODED_LEN: usize = 19usize;
8907    pub const DEFAULT: Self = Self {
8908        id: 0_u32,
8909        time_to_minimum_delta: 0.0_f32,
8910        altitude_minimum_delta: 0.0_f32,
8911        horizontal_minimum_delta: 0.0_f32,
8912        src: MavCollisionSrc::DEFAULT,
8913        action: MavCollisionAction::DEFAULT,
8914        threat_level: MavCollisionThreatLevel::DEFAULT,
8915    };
8916    #[cfg(feature = "arbitrary")]
8917    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8918        use arbitrary::{Arbitrary, Unstructured};
8919        let mut buf = [0u8; 1024];
8920        rng.fill_bytes(&mut buf);
8921        let mut unstructured = Unstructured::new(&buf);
8922        Self::arbitrary(&mut unstructured).unwrap_or_default()
8923    }
8924}
8925impl Default for COLLISION_DATA {
8926    fn default() -> Self {
8927        Self::DEFAULT.clone()
8928    }
8929}
8930impl MessageData for COLLISION_DATA {
8931    type Message = MavMessage;
8932    const ID: u32 = 247u32;
8933    const NAME: &'static str = "COLLISION";
8934    const EXTRA_CRC: u8 = 81u8;
8935    const ENCODED_LEN: usize = 19usize;
8936    fn deser(
8937        _version: MavlinkVersion,
8938        __input: &[u8],
8939    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8940        let avail_len = __input.len();
8941        let mut payload_buf = [0; Self::ENCODED_LEN];
8942        let mut buf = if avail_len < Self::ENCODED_LEN {
8943            payload_buf[0..avail_len].copy_from_slice(__input);
8944            Bytes::new(&payload_buf)
8945        } else {
8946            Bytes::new(__input)
8947        };
8948        let mut __struct = Self::default();
8949        __struct.id = buf.get_u32_le();
8950        __struct.time_to_minimum_delta = buf.get_f32_le();
8951        __struct.altitude_minimum_delta = buf.get_f32_le();
8952        __struct.horizontal_minimum_delta = buf.get_f32_le();
8953        let tmp = buf.get_u8();
8954        __struct.src =
8955            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8956                enum_type: "MavCollisionSrc",
8957                value: tmp as u32,
8958            })?;
8959        let tmp = buf.get_u8();
8960        __struct.action =
8961            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8962                enum_type: "MavCollisionAction",
8963                value: tmp as u32,
8964            })?;
8965        let tmp = buf.get_u8();
8966        __struct.threat_level =
8967            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8968                enum_type: "MavCollisionThreatLevel",
8969                value: tmp as u32,
8970            })?;
8971        Ok(__struct)
8972    }
8973    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8974        let mut __tmp = BytesMut::new(bytes);
8975        #[allow(clippy::absurd_extreme_comparisons)]
8976        #[allow(unused_comparisons)]
8977        if __tmp.remaining() < Self::ENCODED_LEN {
8978            panic!(
8979                "buffer is too small (need {} bytes, but got {})",
8980                Self::ENCODED_LEN,
8981                __tmp.remaining(),
8982            )
8983        }
8984        __tmp.put_u32_le(self.id);
8985        __tmp.put_f32_le(self.time_to_minimum_delta);
8986        __tmp.put_f32_le(self.altitude_minimum_delta);
8987        __tmp.put_f32_le(self.horizontal_minimum_delta);
8988        __tmp.put_u8(self.src as u8);
8989        __tmp.put_u8(self.action as u8);
8990        __tmp.put_u8(self.threat_level as u8);
8991        if matches!(version, MavlinkVersion::V2) {
8992            let len = __tmp.len();
8993            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8994        } else {
8995            __tmp.len()
8996        }
8997    }
8998}
8999#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9000#[doc = ""]
9001#[doc = "ID: 77"]
9002#[derive(Debug, Clone, PartialEq)]
9003#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9004#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9005#[cfg_attr(feature = "ts", derive(TS))]
9006#[cfg_attr(feature = "ts", ts(export))]
9007pub struct COMMAND_ACK_DATA {
9008    #[doc = "Command ID (of acknowledged command)."]
9009    pub command: MavCmd,
9010    #[doc = "Result of command."]
9011    pub result: MavResult,
9012    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9013    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9014    pub progress: u8,
9015    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9016    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9017    pub result_param2: i32,
9018    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9019    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9020    pub target_system: u8,
9021    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9022    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9023    pub target_component: u8,
9024}
9025impl COMMAND_ACK_DATA {
9026    pub const ENCODED_LEN: usize = 10usize;
9027    pub const DEFAULT: Self = Self {
9028        command: MavCmd::DEFAULT,
9029        result: MavResult::DEFAULT,
9030        progress: 0_u8,
9031        result_param2: 0_i32,
9032        target_system: 0_u8,
9033        target_component: 0_u8,
9034    };
9035    #[cfg(feature = "arbitrary")]
9036    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9037        use arbitrary::{Arbitrary, Unstructured};
9038        let mut buf = [0u8; 1024];
9039        rng.fill_bytes(&mut buf);
9040        let mut unstructured = Unstructured::new(&buf);
9041        Self::arbitrary(&mut unstructured).unwrap_or_default()
9042    }
9043}
9044impl Default for COMMAND_ACK_DATA {
9045    fn default() -> Self {
9046        Self::DEFAULT.clone()
9047    }
9048}
9049impl MessageData for COMMAND_ACK_DATA {
9050    type Message = MavMessage;
9051    const ID: u32 = 77u32;
9052    const NAME: &'static str = "COMMAND_ACK";
9053    const EXTRA_CRC: u8 = 143u8;
9054    const ENCODED_LEN: usize = 10usize;
9055    fn deser(
9056        _version: MavlinkVersion,
9057        __input: &[u8],
9058    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9059        let avail_len = __input.len();
9060        let mut payload_buf = [0; Self::ENCODED_LEN];
9061        let mut buf = if avail_len < Self::ENCODED_LEN {
9062            payload_buf[0..avail_len].copy_from_slice(__input);
9063            Bytes::new(&payload_buf)
9064        } else {
9065            Bytes::new(__input)
9066        };
9067        let mut __struct = Self::default();
9068        let tmp = buf.get_u16_le();
9069        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9070            ::mavlink_core::error::ParserError::InvalidEnum {
9071                enum_type: "MavCmd",
9072                value: tmp as u32,
9073            },
9074        )?;
9075        let tmp = buf.get_u8();
9076        __struct.result =
9077            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9078                enum_type: "MavResult",
9079                value: tmp as u32,
9080            })?;
9081        __struct.progress = buf.get_u8();
9082        __struct.result_param2 = buf.get_i32_le();
9083        __struct.target_system = buf.get_u8();
9084        __struct.target_component = buf.get_u8();
9085        Ok(__struct)
9086    }
9087    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9088        let mut __tmp = BytesMut::new(bytes);
9089        #[allow(clippy::absurd_extreme_comparisons)]
9090        #[allow(unused_comparisons)]
9091        if __tmp.remaining() < Self::ENCODED_LEN {
9092            panic!(
9093                "buffer is too small (need {} bytes, but got {})",
9094                Self::ENCODED_LEN,
9095                __tmp.remaining(),
9096            )
9097        }
9098        __tmp.put_u16_le(self.command as u16);
9099        __tmp.put_u8(self.result as u8);
9100        if matches!(version, MavlinkVersion::V2) {
9101            __tmp.put_u8(self.progress);
9102            __tmp.put_i32_le(self.result_param2);
9103            __tmp.put_u8(self.target_system);
9104            __tmp.put_u8(self.target_component);
9105            let len = __tmp.len();
9106            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9107        } else {
9108            __tmp.len()
9109        }
9110    }
9111}
9112#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9113#[doc = ""]
9114#[doc = "ID: 80"]
9115#[derive(Debug, Clone, PartialEq)]
9116#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9118#[cfg_attr(feature = "ts", derive(TS))]
9119#[cfg_attr(feature = "ts", ts(export))]
9120pub struct COMMAND_CANCEL_DATA {
9121    #[doc = "Command ID (of command to cancel)."]
9122    pub command: MavCmd,
9123    #[doc = "System executing long running command. Should not be broadcast (0)."]
9124    pub target_system: u8,
9125    #[doc = "Component executing long running command."]
9126    pub target_component: u8,
9127}
9128impl COMMAND_CANCEL_DATA {
9129    pub const ENCODED_LEN: usize = 4usize;
9130    pub const DEFAULT: Self = Self {
9131        command: MavCmd::DEFAULT,
9132        target_system: 0_u8,
9133        target_component: 0_u8,
9134    };
9135    #[cfg(feature = "arbitrary")]
9136    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9137        use arbitrary::{Arbitrary, Unstructured};
9138        let mut buf = [0u8; 1024];
9139        rng.fill_bytes(&mut buf);
9140        let mut unstructured = Unstructured::new(&buf);
9141        Self::arbitrary(&mut unstructured).unwrap_or_default()
9142    }
9143}
9144impl Default for COMMAND_CANCEL_DATA {
9145    fn default() -> Self {
9146        Self::DEFAULT.clone()
9147    }
9148}
9149impl MessageData for COMMAND_CANCEL_DATA {
9150    type Message = MavMessage;
9151    const ID: u32 = 80u32;
9152    const NAME: &'static str = "COMMAND_CANCEL";
9153    const EXTRA_CRC: u8 = 14u8;
9154    const ENCODED_LEN: usize = 4usize;
9155    fn deser(
9156        _version: MavlinkVersion,
9157        __input: &[u8],
9158    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9159        let avail_len = __input.len();
9160        let mut payload_buf = [0; Self::ENCODED_LEN];
9161        let mut buf = if avail_len < Self::ENCODED_LEN {
9162            payload_buf[0..avail_len].copy_from_slice(__input);
9163            Bytes::new(&payload_buf)
9164        } else {
9165            Bytes::new(__input)
9166        };
9167        let mut __struct = Self::default();
9168        let tmp = buf.get_u16_le();
9169        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9170            ::mavlink_core::error::ParserError::InvalidEnum {
9171                enum_type: "MavCmd",
9172                value: tmp as u32,
9173            },
9174        )?;
9175        __struct.target_system = buf.get_u8();
9176        __struct.target_component = buf.get_u8();
9177        Ok(__struct)
9178    }
9179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9180        let mut __tmp = BytesMut::new(bytes);
9181        #[allow(clippy::absurd_extreme_comparisons)]
9182        #[allow(unused_comparisons)]
9183        if __tmp.remaining() < Self::ENCODED_LEN {
9184            panic!(
9185                "buffer is too small (need {} bytes, but got {})",
9186                Self::ENCODED_LEN,
9187                __tmp.remaining(),
9188            )
9189        }
9190        __tmp.put_u16_le(self.command as u16);
9191        __tmp.put_u8(self.target_system);
9192        __tmp.put_u8(self.target_component);
9193        if matches!(version, MavlinkVersion::V2) {
9194            let len = __tmp.len();
9195            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9196        } else {
9197            __tmp.len()
9198        }
9199    }
9200}
9201#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9202#[doc = ""]
9203#[doc = "ID: 75"]
9204#[derive(Debug, Clone, PartialEq)]
9205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9207#[cfg_attr(feature = "ts", derive(TS))]
9208#[cfg_attr(feature = "ts", ts(export))]
9209pub struct COMMAND_INT_DATA {
9210    #[doc = "PARAM1, see MAV_CMD enum"]
9211    pub param1: f32,
9212    #[doc = "PARAM2, see MAV_CMD enum"]
9213    pub param2: f32,
9214    #[doc = "PARAM3, see MAV_CMD enum"]
9215    pub param3: f32,
9216    #[doc = "PARAM4, see MAV_CMD enum"]
9217    pub param4: f32,
9218    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9219    pub x: i32,
9220    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9221    pub y: i32,
9222    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9223    pub z: f32,
9224    #[doc = "The scheduled action for the mission item."]
9225    pub command: MavCmd,
9226    #[doc = "System ID"]
9227    pub target_system: u8,
9228    #[doc = "Component ID"]
9229    pub target_component: u8,
9230    #[doc = "The coordinate system of the COMMAND."]
9231    pub frame: MavFrame,
9232    #[doc = "Not used."]
9233    pub current: u8,
9234    #[doc = "Not used (set 0)."]
9235    pub autocontinue: u8,
9236}
9237impl COMMAND_INT_DATA {
9238    pub const ENCODED_LEN: usize = 35usize;
9239    pub const DEFAULT: Self = Self {
9240        param1: 0.0_f32,
9241        param2: 0.0_f32,
9242        param3: 0.0_f32,
9243        param4: 0.0_f32,
9244        x: 0_i32,
9245        y: 0_i32,
9246        z: 0.0_f32,
9247        command: MavCmd::DEFAULT,
9248        target_system: 0_u8,
9249        target_component: 0_u8,
9250        frame: MavFrame::DEFAULT,
9251        current: 0_u8,
9252        autocontinue: 0_u8,
9253    };
9254    #[cfg(feature = "arbitrary")]
9255    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9256        use arbitrary::{Arbitrary, Unstructured};
9257        let mut buf = [0u8; 1024];
9258        rng.fill_bytes(&mut buf);
9259        let mut unstructured = Unstructured::new(&buf);
9260        Self::arbitrary(&mut unstructured).unwrap_or_default()
9261    }
9262}
9263impl Default for COMMAND_INT_DATA {
9264    fn default() -> Self {
9265        Self::DEFAULT.clone()
9266    }
9267}
9268impl MessageData for COMMAND_INT_DATA {
9269    type Message = MavMessage;
9270    const ID: u32 = 75u32;
9271    const NAME: &'static str = "COMMAND_INT";
9272    const EXTRA_CRC: u8 = 158u8;
9273    const ENCODED_LEN: usize = 35usize;
9274    fn deser(
9275        _version: MavlinkVersion,
9276        __input: &[u8],
9277    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9278        let avail_len = __input.len();
9279        let mut payload_buf = [0; Self::ENCODED_LEN];
9280        let mut buf = if avail_len < Self::ENCODED_LEN {
9281            payload_buf[0..avail_len].copy_from_slice(__input);
9282            Bytes::new(&payload_buf)
9283        } else {
9284            Bytes::new(__input)
9285        };
9286        let mut __struct = Self::default();
9287        __struct.param1 = buf.get_f32_le();
9288        __struct.param2 = buf.get_f32_le();
9289        __struct.param3 = buf.get_f32_le();
9290        __struct.param4 = buf.get_f32_le();
9291        __struct.x = buf.get_i32_le();
9292        __struct.y = buf.get_i32_le();
9293        __struct.z = buf.get_f32_le();
9294        let tmp = buf.get_u16_le();
9295        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9296            ::mavlink_core::error::ParserError::InvalidEnum {
9297                enum_type: "MavCmd",
9298                value: tmp as u32,
9299            },
9300        )?;
9301        __struct.target_system = buf.get_u8();
9302        __struct.target_component = buf.get_u8();
9303        let tmp = buf.get_u8();
9304        __struct.frame =
9305            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9306                enum_type: "MavFrame",
9307                value: tmp as u32,
9308            })?;
9309        __struct.current = buf.get_u8();
9310        __struct.autocontinue = buf.get_u8();
9311        Ok(__struct)
9312    }
9313    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9314        let mut __tmp = BytesMut::new(bytes);
9315        #[allow(clippy::absurd_extreme_comparisons)]
9316        #[allow(unused_comparisons)]
9317        if __tmp.remaining() < Self::ENCODED_LEN {
9318            panic!(
9319                "buffer is too small (need {} bytes, but got {})",
9320                Self::ENCODED_LEN,
9321                __tmp.remaining(),
9322            )
9323        }
9324        __tmp.put_f32_le(self.param1);
9325        __tmp.put_f32_le(self.param2);
9326        __tmp.put_f32_le(self.param3);
9327        __tmp.put_f32_le(self.param4);
9328        __tmp.put_i32_le(self.x);
9329        __tmp.put_i32_le(self.y);
9330        __tmp.put_f32_le(self.z);
9331        __tmp.put_u16_le(self.command as u16);
9332        __tmp.put_u8(self.target_system);
9333        __tmp.put_u8(self.target_component);
9334        __tmp.put_u8(self.frame as u8);
9335        __tmp.put_u8(self.current);
9336        __tmp.put_u8(self.autocontinue);
9337        if matches!(version, MavlinkVersion::V2) {
9338            let len = __tmp.len();
9339            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9340        } else {
9341            __tmp.len()
9342        }
9343    }
9344}
9345#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9346#[doc = ""]
9347#[doc = "ID: 76"]
9348#[derive(Debug, Clone, PartialEq)]
9349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9351#[cfg_attr(feature = "ts", derive(TS))]
9352#[cfg_attr(feature = "ts", ts(export))]
9353pub struct COMMAND_LONG_DATA {
9354    #[doc = "Parameter 1 (for the specific command)."]
9355    pub param1: f32,
9356    #[doc = "Parameter 2 (for the specific command)."]
9357    pub param2: f32,
9358    #[doc = "Parameter 3 (for the specific command)."]
9359    pub param3: f32,
9360    #[doc = "Parameter 4 (for the specific command)."]
9361    pub param4: f32,
9362    #[doc = "Parameter 5 (for the specific command)."]
9363    pub param5: f32,
9364    #[doc = "Parameter 6 (for the specific command)."]
9365    pub param6: f32,
9366    #[doc = "Parameter 7 (for the specific command)."]
9367    pub param7: f32,
9368    #[doc = "Command ID (of command to send)."]
9369    pub command: MavCmd,
9370    #[doc = "System which should execute the command"]
9371    pub target_system: u8,
9372    #[doc = "Component which should execute the command, 0 for all components"]
9373    pub target_component: u8,
9374    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9375    pub confirmation: u8,
9376}
9377impl COMMAND_LONG_DATA {
9378    pub const ENCODED_LEN: usize = 33usize;
9379    pub const DEFAULT: Self = Self {
9380        param1: 0.0_f32,
9381        param2: 0.0_f32,
9382        param3: 0.0_f32,
9383        param4: 0.0_f32,
9384        param5: 0.0_f32,
9385        param6: 0.0_f32,
9386        param7: 0.0_f32,
9387        command: MavCmd::DEFAULT,
9388        target_system: 0_u8,
9389        target_component: 0_u8,
9390        confirmation: 0_u8,
9391    };
9392    #[cfg(feature = "arbitrary")]
9393    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9394        use arbitrary::{Arbitrary, Unstructured};
9395        let mut buf = [0u8; 1024];
9396        rng.fill_bytes(&mut buf);
9397        let mut unstructured = Unstructured::new(&buf);
9398        Self::arbitrary(&mut unstructured).unwrap_or_default()
9399    }
9400}
9401impl Default for COMMAND_LONG_DATA {
9402    fn default() -> Self {
9403        Self::DEFAULT.clone()
9404    }
9405}
9406impl MessageData for COMMAND_LONG_DATA {
9407    type Message = MavMessage;
9408    const ID: u32 = 76u32;
9409    const NAME: &'static str = "COMMAND_LONG";
9410    const EXTRA_CRC: u8 = 152u8;
9411    const ENCODED_LEN: usize = 33usize;
9412    fn deser(
9413        _version: MavlinkVersion,
9414        __input: &[u8],
9415    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9416        let avail_len = __input.len();
9417        let mut payload_buf = [0; Self::ENCODED_LEN];
9418        let mut buf = if avail_len < Self::ENCODED_LEN {
9419            payload_buf[0..avail_len].copy_from_slice(__input);
9420            Bytes::new(&payload_buf)
9421        } else {
9422            Bytes::new(__input)
9423        };
9424        let mut __struct = Self::default();
9425        __struct.param1 = buf.get_f32_le();
9426        __struct.param2 = buf.get_f32_le();
9427        __struct.param3 = buf.get_f32_le();
9428        __struct.param4 = buf.get_f32_le();
9429        __struct.param5 = buf.get_f32_le();
9430        __struct.param6 = buf.get_f32_le();
9431        __struct.param7 = buf.get_f32_le();
9432        let tmp = buf.get_u16_le();
9433        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9434            ::mavlink_core::error::ParserError::InvalidEnum {
9435                enum_type: "MavCmd",
9436                value: tmp as u32,
9437            },
9438        )?;
9439        __struct.target_system = buf.get_u8();
9440        __struct.target_component = buf.get_u8();
9441        __struct.confirmation = buf.get_u8();
9442        Ok(__struct)
9443    }
9444    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9445        let mut __tmp = BytesMut::new(bytes);
9446        #[allow(clippy::absurd_extreme_comparisons)]
9447        #[allow(unused_comparisons)]
9448        if __tmp.remaining() < Self::ENCODED_LEN {
9449            panic!(
9450                "buffer is too small (need {} bytes, but got {})",
9451                Self::ENCODED_LEN,
9452                __tmp.remaining(),
9453            )
9454        }
9455        __tmp.put_f32_le(self.param1);
9456        __tmp.put_f32_le(self.param2);
9457        __tmp.put_f32_le(self.param3);
9458        __tmp.put_f32_le(self.param4);
9459        __tmp.put_f32_le(self.param5);
9460        __tmp.put_f32_le(self.param6);
9461        __tmp.put_f32_le(self.param7);
9462        __tmp.put_u16_le(self.command as u16);
9463        __tmp.put_u8(self.target_system);
9464        __tmp.put_u8(self.target_component);
9465        __tmp.put_u8(self.confirmation);
9466        if matches!(version, MavlinkVersion::V2) {
9467            let len = __tmp.len();
9468            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9469        } else {
9470            __tmp.len()
9471        }
9472    }
9473}
9474#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9475#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9476#[doc = ""]
9477#[doc = "ID: 395"]
9478#[derive(Debug, Clone, PartialEq)]
9479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9481#[cfg_attr(feature = "ts", derive(TS))]
9482#[cfg_attr(feature = "ts", ts(export))]
9483pub struct COMPONENT_INFORMATION_DATA {
9484    #[doc = "Timestamp (time since system boot)."]
9485    pub time_boot_ms: u32,
9486    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9487    pub general_metadata_file_crc: u32,
9488    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9489    pub peripherals_metadata_file_crc: u32,
9490    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9491    #[cfg_attr(
9492        feature = "serde",
9493        serde(
9494            serialize_with = "crate::nulstr::serialize::<_, 100>",
9495            deserialize_with = "crate::nulstr::deserialize::<_, 100>"
9496        )
9497    )]
9498    #[cfg_attr(feature = "ts", ts(type = "string"))]
9499    pub general_metadata_uri: [u8; 100],
9500    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9501    #[cfg_attr(
9502        feature = "serde",
9503        serde(
9504            serialize_with = "crate::nulstr::serialize::<_, 100>",
9505            deserialize_with = "crate::nulstr::deserialize::<_, 100>"
9506        )
9507    )]
9508    #[cfg_attr(feature = "ts", ts(type = "string"))]
9509    pub peripherals_metadata_uri: [u8; 100],
9510}
9511impl COMPONENT_INFORMATION_DATA {
9512    pub const ENCODED_LEN: usize = 212usize;
9513    pub const DEFAULT: Self = Self {
9514        time_boot_ms: 0_u32,
9515        general_metadata_file_crc: 0_u32,
9516        peripherals_metadata_file_crc: 0_u32,
9517        general_metadata_uri: [0_u8; 100usize],
9518        peripherals_metadata_uri: [0_u8; 100usize],
9519    };
9520    #[cfg(feature = "arbitrary")]
9521    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9522        use arbitrary::{Arbitrary, Unstructured};
9523        let mut buf = [0u8; 1024];
9524        rng.fill_bytes(&mut buf);
9525        let mut unstructured = Unstructured::new(&buf);
9526        Self::arbitrary(&mut unstructured).unwrap_or_default()
9527    }
9528}
9529impl Default for COMPONENT_INFORMATION_DATA {
9530    fn default() -> Self {
9531        Self::DEFAULT.clone()
9532    }
9533}
9534impl MessageData for COMPONENT_INFORMATION_DATA {
9535    type Message = MavMessage;
9536    const ID: u32 = 395u32;
9537    const NAME: &'static str = "COMPONENT_INFORMATION";
9538    const EXTRA_CRC: u8 = 0u8;
9539    const ENCODED_LEN: usize = 212usize;
9540    fn deser(
9541        _version: MavlinkVersion,
9542        __input: &[u8],
9543    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9544        let avail_len = __input.len();
9545        let mut payload_buf = [0; Self::ENCODED_LEN];
9546        let mut buf = if avail_len < Self::ENCODED_LEN {
9547            payload_buf[0..avail_len].copy_from_slice(__input);
9548            Bytes::new(&payload_buf)
9549        } else {
9550            Bytes::new(__input)
9551        };
9552        let mut __struct = Self::default();
9553        __struct.time_boot_ms = buf.get_u32_le();
9554        __struct.general_metadata_file_crc = buf.get_u32_le();
9555        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9556        for v in &mut __struct.general_metadata_uri {
9557            let val = buf.get_u8();
9558            *v = val;
9559        }
9560        for v in &mut __struct.peripherals_metadata_uri {
9561            let val = buf.get_u8();
9562            *v = val;
9563        }
9564        Ok(__struct)
9565    }
9566    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9567        let mut __tmp = BytesMut::new(bytes);
9568        #[allow(clippy::absurd_extreme_comparisons)]
9569        #[allow(unused_comparisons)]
9570        if __tmp.remaining() < Self::ENCODED_LEN {
9571            panic!(
9572                "buffer is too small (need {} bytes, but got {})",
9573                Self::ENCODED_LEN,
9574                __tmp.remaining(),
9575            )
9576        }
9577        __tmp.put_u32_le(self.time_boot_ms);
9578        __tmp.put_u32_le(self.general_metadata_file_crc);
9579        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9580        for val in &self.general_metadata_uri {
9581            __tmp.put_u8(*val);
9582        }
9583        for val in &self.peripherals_metadata_uri {
9584            __tmp.put_u8(*val);
9585        }
9586        if matches!(version, MavlinkVersion::V2) {
9587            let len = __tmp.len();
9588            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9589        } else {
9590            __tmp.len()
9591        }
9592    }
9593}
9594#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9595#[doc = ""]
9596#[doc = "ID: 396"]
9597#[derive(Debug, Clone, PartialEq)]
9598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9600#[cfg_attr(feature = "ts", derive(TS))]
9601#[cfg_attr(feature = "ts", ts(export))]
9602pub struct COMPONENT_INFORMATION_BASIC_DATA {
9603    #[doc = "Component capability flags"]
9604    pub capabilities: MavProtocolCapability,
9605    #[doc = "Timestamp (time since system boot)."]
9606    pub time_boot_ms: u32,
9607    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9608    pub time_manufacture_s: u32,
9609    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9610    #[cfg_attr(
9611        feature = "serde",
9612        serde(
9613            serialize_with = "crate::nulstr::serialize::<_, 32>",
9614            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
9615        )
9616    )]
9617    #[cfg_attr(feature = "ts", ts(type = "string"))]
9618    pub vendor_name: [u8; 32],
9619    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9620    #[cfg_attr(
9621        feature = "serde",
9622        serde(
9623            serialize_with = "crate::nulstr::serialize::<_, 32>",
9624            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
9625        )
9626    )]
9627    #[cfg_attr(feature = "ts", ts(type = "string"))]
9628    pub model_name: [u8; 32],
9629    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9630    #[cfg_attr(
9631        feature = "serde",
9632        serde(
9633            serialize_with = "crate::nulstr::serialize::<_, 24>",
9634            deserialize_with = "crate::nulstr::deserialize::<_, 24>"
9635        )
9636    )]
9637    #[cfg_attr(feature = "ts", ts(type = "string"))]
9638    pub software_version: [u8; 24],
9639    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9640    #[cfg_attr(
9641        feature = "serde",
9642        serde(
9643            serialize_with = "crate::nulstr::serialize::<_, 24>",
9644            deserialize_with = "crate::nulstr::deserialize::<_, 24>"
9645        )
9646    )]
9647    #[cfg_attr(feature = "ts", ts(type = "string"))]
9648    pub hardware_version: [u8; 24],
9649    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9650    #[cfg_attr(
9651        feature = "serde",
9652        serde(
9653            serialize_with = "crate::nulstr::serialize::<_, 32>",
9654            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
9655        )
9656    )]
9657    #[cfg_attr(feature = "ts", ts(type = "string"))]
9658    pub serial_number: [u8; 32],
9659}
9660impl COMPONENT_INFORMATION_BASIC_DATA {
9661    pub const ENCODED_LEN: usize = 160usize;
9662    pub const DEFAULT: Self = Self {
9663        capabilities: MavProtocolCapability::DEFAULT,
9664        time_boot_ms: 0_u32,
9665        time_manufacture_s: 0_u32,
9666        vendor_name: [0_u8; 32usize],
9667        model_name: [0_u8; 32usize],
9668        software_version: [0_u8; 24usize],
9669        hardware_version: [0_u8; 24usize],
9670        serial_number: [0_u8; 32usize],
9671    };
9672    #[cfg(feature = "arbitrary")]
9673    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9674        use arbitrary::{Arbitrary, Unstructured};
9675        let mut buf = [0u8; 1024];
9676        rng.fill_bytes(&mut buf);
9677        let mut unstructured = Unstructured::new(&buf);
9678        Self::arbitrary(&mut unstructured).unwrap_or_default()
9679    }
9680}
9681impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9682    fn default() -> Self {
9683        Self::DEFAULT.clone()
9684    }
9685}
9686impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9687    type Message = MavMessage;
9688    const ID: u32 = 396u32;
9689    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9690    const EXTRA_CRC: u8 = 50u8;
9691    const ENCODED_LEN: usize = 160usize;
9692    fn deser(
9693        _version: MavlinkVersion,
9694        __input: &[u8],
9695    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9696        let avail_len = __input.len();
9697        let mut payload_buf = [0; Self::ENCODED_LEN];
9698        let mut buf = if avail_len < Self::ENCODED_LEN {
9699            payload_buf[0..avail_len].copy_from_slice(__input);
9700            Bytes::new(&payload_buf)
9701        } else {
9702            Bytes::new(__input)
9703        };
9704        let mut __struct = Self::default();
9705        let tmp = buf.get_u64_le();
9706        __struct.capabilities = MavProtocolCapability::from_bits(
9707            tmp & MavProtocolCapability::all().bits(),
9708        )
9709        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9710            flag_type: "MavProtocolCapability",
9711            value: tmp as u32,
9712        })?;
9713        __struct.time_boot_ms = buf.get_u32_le();
9714        __struct.time_manufacture_s = buf.get_u32_le();
9715        for v in &mut __struct.vendor_name {
9716            let val = buf.get_u8();
9717            *v = val;
9718        }
9719        for v in &mut __struct.model_name {
9720            let val = buf.get_u8();
9721            *v = val;
9722        }
9723        for v in &mut __struct.software_version {
9724            let val = buf.get_u8();
9725            *v = val;
9726        }
9727        for v in &mut __struct.hardware_version {
9728            let val = buf.get_u8();
9729            *v = val;
9730        }
9731        for v in &mut __struct.serial_number {
9732            let val = buf.get_u8();
9733            *v = val;
9734        }
9735        Ok(__struct)
9736    }
9737    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9738        let mut __tmp = BytesMut::new(bytes);
9739        #[allow(clippy::absurd_extreme_comparisons)]
9740        #[allow(unused_comparisons)]
9741        if __tmp.remaining() < Self::ENCODED_LEN {
9742            panic!(
9743                "buffer is too small (need {} bytes, but got {})",
9744                Self::ENCODED_LEN,
9745                __tmp.remaining(),
9746            )
9747        }
9748        __tmp.put_u64_le(self.capabilities.bits());
9749        __tmp.put_u32_le(self.time_boot_ms);
9750        __tmp.put_u32_le(self.time_manufacture_s);
9751        for val in &self.vendor_name {
9752            __tmp.put_u8(*val);
9753        }
9754        for val in &self.model_name {
9755            __tmp.put_u8(*val);
9756        }
9757        for val in &self.software_version {
9758            __tmp.put_u8(*val);
9759        }
9760        for val in &self.hardware_version {
9761            __tmp.put_u8(*val);
9762        }
9763        for val in &self.serial_number {
9764            __tmp.put_u8(*val);
9765        }
9766        if matches!(version, MavlinkVersion::V2) {
9767            let len = __tmp.len();
9768            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9769        } else {
9770            __tmp.len()
9771        }
9772    }
9773}
9774#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9775#[doc = ""]
9776#[doc = "ID: 397"]
9777#[derive(Debug, Clone, PartialEq)]
9778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9780#[cfg_attr(feature = "ts", derive(TS))]
9781#[cfg_attr(feature = "ts", ts(export))]
9782pub struct COMPONENT_METADATA_DATA {
9783    #[doc = "Timestamp (time since system boot)."]
9784    pub time_boot_ms: u32,
9785    #[doc = "CRC32 of the general metadata file."]
9786    pub file_crc: u32,
9787    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9788    #[cfg_attr(
9789        feature = "serde",
9790        serde(
9791            serialize_with = "crate::nulstr::serialize::<_, 100>",
9792            deserialize_with = "crate::nulstr::deserialize::<_, 100>"
9793        )
9794    )]
9795    #[cfg_attr(feature = "ts", ts(type = "string"))]
9796    pub uri: [u8; 100],
9797}
9798impl COMPONENT_METADATA_DATA {
9799    pub const ENCODED_LEN: usize = 108usize;
9800    pub const DEFAULT: Self = Self {
9801        time_boot_ms: 0_u32,
9802        file_crc: 0_u32,
9803        uri: [0_u8; 100usize],
9804    };
9805    #[cfg(feature = "arbitrary")]
9806    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9807        use arbitrary::{Arbitrary, Unstructured};
9808        let mut buf = [0u8; 1024];
9809        rng.fill_bytes(&mut buf);
9810        let mut unstructured = Unstructured::new(&buf);
9811        Self::arbitrary(&mut unstructured).unwrap_or_default()
9812    }
9813}
9814impl Default for COMPONENT_METADATA_DATA {
9815    fn default() -> Self {
9816        Self::DEFAULT.clone()
9817    }
9818}
9819impl MessageData for COMPONENT_METADATA_DATA {
9820    type Message = MavMessage;
9821    const ID: u32 = 397u32;
9822    const NAME: &'static str = "COMPONENT_METADATA";
9823    const EXTRA_CRC: u8 = 182u8;
9824    const ENCODED_LEN: usize = 108usize;
9825    fn deser(
9826        _version: MavlinkVersion,
9827        __input: &[u8],
9828    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9829        let avail_len = __input.len();
9830        let mut payload_buf = [0; Self::ENCODED_LEN];
9831        let mut buf = if avail_len < Self::ENCODED_LEN {
9832            payload_buf[0..avail_len].copy_from_slice(__input);
9833            Bytes::new(&payload_buf)
9834        } else {
9835            Bytes::new(__input)
9836        };
9837        let mut __struct = Self::default();
9838        __struct.time_boot_ms = buf.get_u32_le();
9839        __struct.file_crc = buf.get_u32_le();
9840        for v in &mut __struct.uri {
9841            let val = buf.get_u8();
9842            *v = val;
9843        }
9844        Ok(__struct)
9845    }
9846    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9847        let mut __tmp = BytesMut::new(bytes);
9848        #[allow(clippy::absurd_extreme_comparisons)]
9849        #[allow(unused_comparisons)]
9850        if __tmp.remaining() < Self::ENCODED_LEN {
9851            panic!(
9852                "buffer is too small (need {} bytes, but got {})",
9853                Self::ENCODED_LEN,
9854                __tmp.remaining(),
9855            )
9856        }
9857        __tmp.put_u32_le(self.time_boot_ms);
9858        __tmp.put_u32_le(self.file_crc);
9859        for val in &self.uri {
9860            __tmp.put_u8(*val);
9861        }
9862        if matches!(version, MavlinkVersion::V2) {
9863            let len = __tmp.len();
9864            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9865        } else {
9866            __tmp.len()
9867        }
9868    }
9869}
9870#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9871#[doc = ""]
9872#[doc = "ID: 146"]
9873#[derive(Debug, Clone, PartialEq)]
9874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9876#[cfg_attr(feature = "ts", derive(TS))]
9877#[cfg_attr(feature = "ts", ts(export))]
9878pub struct CONTROL_SYSTEM_STATE_DATA {
9879    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9880    pub time_usec: u64,
9881    #[doc = "X acceleration in body frame"]
9882    pub x_acc: f32,
9883    #[doc = "Y acceleration in body frame"]
9884    pub y_acc: f32,
9885    #[doc = "Z acceleration in body frame"]
9886    pub z_acc: f32,
9887    #[doc = "X velocity in body frame"]
9888    pub x_vel: f32,
9889    #[doc = "Y velocity in body frame"]
9890    pub y_vel: f32,
9891    #[doc = "Z velocity in body frame"]
9892    pub z_vel: f32,
9893    #[doc = "X position in local frame"]
9894    pub x_pos: f32,
9895    #[doc = "Y position in local frame"]
9896    pub y_pos: f32,
9897    #[doc = "Z position in local frame"]
9898    pub z_pos: f32,
9899    #[doc = "Airspeed, set to -1 if unknown"]
9900    pub airspeed: f32,
9901    #[doc = "Variance of body velocity estimate"]
9902    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9903    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9904    pub vel_variance: [f32; 3],
9905    #[doc = "Variance in local position"]
9906    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9907    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9908    pub pos_variance: [f32; 3],
9909    #[doc = "The attitude, represented as Quaternion"]
9910    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9911    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9912    pub q: [f32; 4],
9913    #[doc = "Angular rate in roll axis"]
9914    pub roll_rate: f32,
9915    #[doc = "Angular rate in pitch axis"]
9916    pub pitch_rate: f32,
9917    #[doc = "Angular rate in yaw axis"]
9918    pub yaw_rate: f32,
9919}
9920impl CONTROL_SYSTEM_STATE_DATA {
9921    pub const ENCODED_LEN: usize = 100usize;
9922    pub const DEFAULT: Self = Self {
9923        time_usec: 0_u64,
9924        x_acc: 0.0_f32,
9925        y_acc: 0.0_f32,
9926        z_acc: 0.0_f32,
9927        x_vel: 0.0_f32,
9928        y_vel: 0.0_f32,
9929        z_vel: 0.0_f32,
9930        x_pos: 0.0_f32,
9931        y_pos: 0.0_f32,
9932        z_pos: 0.0_f32,
9933        airspeed: 0.0_f32,
9934        vel_variance: [0.0_f32; 3usize],
9935        pos_variance: [0.0_f32; 3usize],
9936        q: [0.0_f32; 4usize],
9937        roll_rate: 0.0_f32,
9938        pitch_rate: 0.0_f32,
9939        yaw_rate: 0.0_f32,
9940    };
9941    #[cfg(feature = "arbitrary")]
9942    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9943        use arbitrary::{Arbitrary, Unstructured};
9944        let mut buf = [0u8; 1024];
9945        rng.fill_bytes(&mut buf);
9946        let mut unstructured = Unstructured::new(&buf);
9947        Self::arbitrary(&mut unstructured).unwrap_or_default()
9948    }
9949}
9950impl Default for CONTROL_SYSTEM_STATE_DATA {
9951    fn default() -> Self {
9952        Self::DEFAULT.clone()
9953    }
9954}
9955impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9956    type Message = MavMessage;
9957    const ID: u32 = 146u32;
9958    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9959    const EXTRA_CRC: u8 = 103u8;
9960    const ENCODED_LEN: usize = 100usize;
9961    fn deser(
9962        _version: MavlinkVersion,
9963        __input: &[u8],
9964    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9965        let avail_len = __input.len();
9966        let mut payload_buf = [0; Self::ENCODED_LEN];
9967        let mut buf = if avail_len < Self::ENCODED_LEN {
9968            payload_buf[0..avail_len].copy_from_slice(__input);
9969            Bytes::new(&payload_buf)
9970        } else {
9971            Bytes::new(__input)
9972        };
9973        let mut __struct = Self::default();
9974        __struct.time_usec = buf.get_u64_le();
9975        __struct.x_acc = buf.get_f32_le();
9976        __struct.y_acc = buf.get_f32_le();
9977        __struct.z_acc = buf.get_f32_le();
9978        __struct.x_vel = buf.get_f32_le();
9979        __struct.y_vel = buf.get_f32_le();
9980        __struct.z_vel = buf.get_f32_le();
9981        __struct.x_pos = buf.get_f32_le();
9982        __struct.y_pos = buf.get_f32_le();
9983        __struct.z_pos = buf.get_f32_le();
9984        __struct.airspeed = buf.get_f32_le();
9985        for v in &mut __struct.vel_variance {
9986            let val = buf.get_f32_le();
9987            *v = val;
9988        }
9989        for v in &mut __struct.pos_variance {
9990            let val = buf.get_f32_le();
9991            *v = val;
9992        }
9993        for v in &mut __struct.q {
9994            let val = buf.get_f32_le();
9995            *v = val;
9996        }
9997        __struct.roll_rate = buf.get_f32_le();
9998        __struct.pitch_rate = buf.get_f32_le();
9999        __struct.yaw_rate = buf.get_f32_le();
10000        Ok(__struct)
10001    }
10002    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10003        let mut __tmp = BytesMut::new(bytes);
10004        #[allow(clippy::absurd_extreme_comparisons)]
10005        #[allow(unused_comparisons)]
10006        if __tmp.remaining() < Self::ENCODED_LEN {
10007            panic!(
10008                "buffer is too small (need {} bytes, but got {})",
10009                Self::ENCODED_LEN,
10010                __tmp.remaining(),
10011            )
10012        }
10013        __tmp.put_u64_le(self.time_usec);
10014        __tmp.put_f32_le(self.x_acc);
10015        __tmp.put_f32_le(self.y_acc);
10016        __tmp.put_f32_le(self.z_acc);
10017        __tmp.put_f32_le(self.x_vel);
10018        __tmp.put_f32_le(self.y_vel);
10019        __tmp.put_f32_le(self.z_vel);
10020        __tmp.put_f32_le(self.x_pos);
10021        __tmp.put_f32_le(self.y_pos);
10022        __tmp.put_f32_le(self.z_pos);
10023        __tmp.put_f32_le(self.airspeed);
10024        for val in &self.vel_variance {
10025            __tmp.put_f32_le(*val);
10026        }
10027        for val in &self.pos_variance {
10028            __tmp.put_f32_le(*val);
10029        }
10030        for val in &self.q {
10031            __tmp.put_f32_le(*val);
10032        }
10033        __tmp.put_f32_le(self.roll_rate);
10034        __tmp.put_f32_le(self.pitch_rate);
10035        __tmp.put_f32_le(self.yaw_rate);
10036        if matches!(version, MavlinkVersion::V2) {
10037            let len = __tmp.len();
10038            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10039        } else {
10040            __tmp.len()
10041        }
10042    }
10043}
10044#[doc = "offset response to encapsulated data."]
10045#[doc = ""]
10046#[doc = "ID: 50005"]
10047#[derive(Debug, Clone, PartialEq)]
10048#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10049#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10050#[cfg_attr(feature = "ts", derive(TS))]
10051#[cfg_attr(feature = "ts", ts(export))]
10052pub struct CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
10053    #[doc = "FW Offset."]
10054    pub offset: u32,
10055    #[doc = "System ID."]
10056    pub target_system: u8,
10057    #[doc = "Component ID."]
10058    pub target_component: u8,
10059}
10060impl CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
10061    pub const ENCODED_LEN: usize = 6usize;
10062    pub const DEFAULT: Self = Self {
10063        offset: 0_u32,
10064        target_system: 0_u8,
10065        target_component: 0_u8,
10066    };
10067    #[cfg(feature = "arbitrary")]
10068    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10069        use arbitrary::{Arbitrary, Unstructured};
10070        let mut buf = [0u8; 1024];
10071        rng.fill_bytes(&mut buf);
10072        let mut unstructured = Unstructured::new(&buf);
10073        Self::arbitrary(&mut unstructured).unwrap_or_default()
10074    }
10075}
10076impl Default for CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
10077    fn default() -> Self {
10078        Self::DEFAULT.clone()
10079    }
10080}
10081impl MessageData for CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
10082    type Message = MavMessage;
10083    const ID: u32 = 50005u32;
10084    const NAME: &'static str = "CUBEPILOT_FIRMWARE_UPDATE_RESP";
10085    const EXTRA_CRC: u8 = 152u8;
10086    const ENCODED_LEN: usize = 6usize;
10087    fn deser(
10088        _version: MavlinkVersion,
10089        __input: &[u8],
10090    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10091        let avail_len = __input.len();
10092        let mut payload_buf = [0; Self::ENCODED_LEN];
10093        let mut buf = if avail_len < Self::ENCODED_LEN {
10094            payload_buf[0..avail_len].copy_from_slice(__input);
10095            Bytes::new(&payload_buf)
10096        } else {
10097            Bytes::new(__input)
10098        };
10099        let mut __struct = Self::default();
10100        __struct.offset = buf.get_u32_le();
10101        __struct.target_system = buf.get_u8();
10102        __struct.target_component = buf.get_u8();
10103        Ok(__struct)
10104    }
10105    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10106        let mut __tmp = BytesMut::new(bytes);
10107        #[allow(clippy::absurd_extreme_comparisons)]
10108        #[allow(unused_comparisons)]
10109        if __tmp.remaining() < Self::ENCODED_LEN {
10110            panic!(
10111                "buffer is too small (need {} bytes, but got {})",
10112                Self::ENCODED_LEN,
10113                __tmp.remaining(),
10114            )
10115        }
10116        __tmp.put_u32_le(self.offset);
10117        __tmp.put_u8(self.target_system);
10118        __tmp.put_u8(self.target_component);
10119        if matches!(version, MavlinkVersion::V2) {
10120            let len = __tmp.len();
10121            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10122        } else {
10123            __tmp.len()
10124        }
10125    }
10126}
10127#[doc = "Start firmware update with encapsulated data."]
10128#[doc = ""]
10129#[doc = "ID: 50004"]
10130#[derive(Debug, Clone, PartialEq)]
10131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10133#[cfg_attr(feature = "ts", derive(TS))]
10134#[cfg_attr(feature = "ts", ts(export))]
10135pub struct CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
10136    #[doc = "FW Size."]
10137    pub size: u32,
10138    #[doc = "FW CRC."]
10139    pub crc: u32,
10140    #[doc = "System ID."]
10141    pub target_system: u8,
10142    #[doc = "Component ID."]
10143    pub target_component: u8,
10144}
10145impl CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
10146    pub const ENCODED_LEN: usize = 10usize;
10147    pub const DEFAULT: Self = Self {
10148        size: 0_u32,
10149        crc: 0_u32,
10150        target_system: 0_u8,
10151        target_component: 0_u8,
10152    };
10153    #[cfg(feature = "arbitrary")]
10154    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10155        use arbitrary::{Arbitrary, Unstructured};
10156        let mut buf = [0u8; 1024];
10157        rng.fill_bytes(&mut buf);
10158        let mut unstructured = Unstructured::new(&buf);
10159        Self::arbitrary(&mut unstructured).unwrap_or_default()
10160    }
10161}
10162impl Default for CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
10163    fn default() -> Self {
10164        Self::DEFAULT.clone()
10165    }
10166}
10167impl MessageData for CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
10168    type Message = MavMessage;
10169    const ID: u32 = 50004u32;
10170    const NAME: &'static str = "CUBEPILOT_FIRMWARE_UPDATE_START";
10171    const EXTRA_CRC: u8 = 240u8;
10172    const ENCODED_LEN: usize = 10usize;
10173    fn deser(
10174        _version: MavlinkVersion,
10175        __input: &[u8],
10176    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10177        let avail_len = __input.len();
10178        let mut payload_buf = [0; Self::ENCODED_LEN];
10179        let mut buf = if avail_len < Self::ENCODED_LEN {
10180            payload_buf[0..avail_len].copy_from_slice(__input);
10181            Bytes::new(&payload_buf)
10182        } else {
10183            Bytes::new(__input)
10184        };
10185        let mut __struct = Self::default();
10186        __struct.size = buf.get_u32_le();
10187        __struct.crc = buf.get_u32_le();
10188        __struct.target_system = buf.get_u8();
10189        __struct.target_component = buf.get_u8();
10190        Ok(__struct)
10191    }
10192    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10193        let mut __tmp = BytesMut::new(bytes);
10194        #[allow(clippy::absurd_extreme_comparisons)]
10195        #[allow(unused_comparisons)]
10196        if __tmp.remaining() < Self::ENCODED_LEN {
10197            panic!(
10198                "buffer is too small (need {} bytes, but got {})",
10199                Self::ENCODED_LEN,
10200                __tmp.remaining(),
10201            )
10202        }
10203        __tmp.put_u32_le(self.size);
10204        __tmp.put_u32_le(self.crc);
10205        __tmp.put_u8(self.target_system);
10206        __tmp.put_u8(self.target_component);
10207        if matches!(version, MavlinkVersion::V2) {
10208            let len = __tmp.len();
10209            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10210        } else {
10211            __tmp.len()
10212        }
10213    }
10214}
10215#[doc = "Raw RC Data."]
10216#[doc = ""]
10217#[doc = "ID: 50001"]
10218#[derive(Debug, Clone, PartialEq)]
10219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10221#[cfg_attr(feature = "ts", derive(TS))]
10222#[cfg_attr(feature = "ts", ts(export))]
10223pub struct CUBEPILOT_RAW_RC_DATA {
10224    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10225    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10226    pub rc_raw: [u8; 32],
10227}
10228impl CUBEPILOT_RAW_RC_DATA {
10229    pub const ENCODED_LEN: usize = 32usize;
10230    pub const DEFAULT: Self = Self {
10231        rc_raw: [0_u8; 32usize],
10232    };
10233    #[cfg(feature = "arbitrary")]
10234    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10235        use arbitrary::{Arbitrary, Unstructured};
10236        let mut buf = [0u8; 1024];
10237        rng.fill_bytes(&mut buf);
10238        let mut unstructured = Unstructured::new(&buf);
10239        Self::arbitrary(&mut unstructured).unwrap_or_default()
10240    }
10241}
10242impl Default for CUBEPILOT_RAW_RC_DATA {
10243    fn default() -> Self {
10244        Self::DEFAULT.clone()
10245    }
10246}
10247impl MessageData for CUBEPILOT_RAW_RC_DATA {
10248    type Message = MavMessage;
10249    const ID: u32 = 50001u32;
10250    const NAME: &'static str = "CUBEPILOT_RAW_RC";
10251    const EXTRA_CRC: u8 = 246u8;
10252    const ENCODED_LEN: usize = 32usize;
10253    fn deser(
10254        _version: MavlinkVersion,
10255        __input: &[u8],
10256    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10257        let avail_len = __input.len();
10258        let mut payload_buf = [0; Self::ENCODED_LEN];
10259        let mut buf = if avail_len < Self::ENCODED_LEN {
10260            payload_buf[0..avail_len].copy_from_slice(__input);
10261            Bytes::new(&payload_buf)
10262        } else {
10263            Bytes::new(__input)
10264        };
10265        let mut __struct = Self::default();
10266        for v in &mut __struct.rc_raw {
10267            let val = buf.get_u8();
10268            *v = val;
10269        }
10270        Ok(__struct)
10271    }
10272    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10273        let mut __tmp = BytesMut::new(bytes);
10274        #[allow(clippy::absurd_extreme_comparisons)]
10275        #[allow(unused_comparisons)]
10276        if __tmp.remaining() < Self::ENCODED_LEN {
10277            panic!(
10278                "buffer is too small (need {} bytes, but got {})",
10279                Self::ENCODED_LEN,
10280                __tmp.remaining(),
10281            )
10282        }
10283        for val in &self.rc_raw {
10284            __tmp.put_u8(*val);
10285        }
10286        if matches!(version, MavlinkVersion::V2) {
10287            let len = __tmp.len();
10288            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10289        } else {
10290            __tmp.len()
10291        }
10292    }
10293}
10294#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10295#[doc = ""]
10296#[doc = "ID: 411"]
10297#[derive(Debug, Clone, PartialEq)]
10298#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10299#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10300#[cfg_attr(feature = "ts", derive(TS))]
10301#[cfg_attr(feature = "ts", ts(export))]
10302pub struct CURRENT_EVENT_SEQUENCE_DATA {
10303    #[doc = "Sequence number."]
10304    pub sequence: u16,
10305    #[doc = "Flag bitset."]
10306    pub flags: MavEventCurrentSequenceFlags,
10307}
10308impl CURRENT_EVENT_SEQUENCE_DATA {
10309    pub const ENCODED_LEN: usize = 3usize;
10310    pub const DEFAULT: Self = Self {
10311        sequence: 0_u16,
10312        flags: MavEventCurrentSequenceFlags::DEFAULT,
10313    };
10314    #[cfg(feature = "arbitrary")]
10315    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10316        use arbitrary::{Arbitrary, Unstructured};
10317        let mut buf = [0u8; 1024];
10318        rng.fill_bytes(&mut buf);
10319        let mut unstructured = Unstructured::new(&buf);
10320        Self::arbitrary(&mut unstructured).unwrap_or_default()
10321    }
10322}
10323impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10324    fn default() -> Self {
10325        Self::DEFAULT.clone()
10326    }
10327}
10328impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10329    type Message = MavMessage;
10330    const ID: u32 = 411u32;
10331    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10332    const EXTRA_CRC: u8 = 106u8;
10333    const ENCODED_LEN: usize = 3usize;
10334    fn deser(
10335        _version: MavlinkVersion,
10336        __input: &[u8],
10337    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10338        let avail_len = __input.len();
10339        let mut payload_buf = [0; Self::ENCODED_LEN];
10340        let mut buf = if avail_len < Self::ENCODED_LEN {
10341            payload_buf[0..avail_len].copy_from_slice(__input);
10342            Bytes::new(&payload_buf)
10343        } else {
10344            Bytes::new(__input)
10345        };
10346        let mut __struct = Self::default();
10347        __struct.sequence = buf.get_u16_le();
10348        let tmp = buf.get_u8();
10349        __struct.flags =
10350            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10351                enum_type: "MavEventCurrentSequenceFlags",
10352                value: tmp as u32,
10353            })?;
10354        Ok(__struct)
10355    }
10356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10357        let mut __tmp = BytesMut::new(bytes);
10358        #[allow(clippy::absurd_extreme_comparisons)]
10359        #[allow(unused_comparisons)]
10360        if __tmp.remaining() < Self::ENCODED_LEN {
10361            panic!(
10362                "buffer is too small (need {} bytes, but got {})",
10363                Self::ENCODED_LEN,
10364                __tmp.remaining(),
10365            )
10366        }
10367        __tmp.put_u16_le(self.sequence);
10368        __tmp.put_u8(self.flags as u8);
10369        if matches!(version, MavlinkVersion::V2) {
10370            let len = __tmp.len();
10371            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10372        } else {
10373            __tmp.len()
10374        }
10375    }
10376}
10377#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10378#[doc = ""]
10379#[doc = "ID: 436"]
10380#[derive(Debug, Clone, PartialEq)]
10381#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10382#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10383#[cfg_attr(feature = "ts", derive(TS))]
10384#[cfg_attr(feature = "ts", ts(export))]
10385pub struct CURRENT_MODE_DATA {
10386    #[doc = "A bitfield for use for autopilot-specific flags"]
10387    pub custom_mode: u32,
10388    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10389    pub intended_custom_mode: u32,
10390    #[doc = "Standard mode."]
10391    pub standard_mode: MavStandardMode,
10392}
10393impl CURRENT_MODE_DATA {
10394    pub const ENCODED_LEN: usize = 9usize;
10395    pub const DEFAULT: Self = Self {
10396        custom_mode: 0_u32,
10397        intended_custom_mode: 0_u32,
10398        standard_mode: MavStandardMode::DEFAULT,
10399    };
10400    #[cfg(feature = "arbitrary")]
10401    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10402        use arbitrary::{Arbitrary, Unstructured};
10403        let mut buf = [0u8; 1024];
10404        rng.fill_bytes(&mut buf);
10405        let mut unstructured = Unstructured::new(&buf);
10406        Self::arbitrary(&mut unstructured).unwrap_or_default()
10407    }
10408}
10409impl Default for CURRENT_MODE_DATA {
10410    fn default() -> Self {
10411        Self::DEFAULT.clone()
10412    }
10413}
10414impl MessageData for CURRENT_MODE_DATA {
10415    type Message = MavMessage;
10416    const ID: u32 = 436u32;
10417    const NAME: &'static str = "CURRENT_MODE";
10418    const EXTRA_CRC: u8 = 193u8;
10419    const ENCODED_LEN: usize = 9usize;
10420    fn deser(
10421        _version: MavlinkVersion,
10422        __input: &[u8],
10423    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10424        let avail_len = __input.len();
10425        let mut payload_buf = [0; Self::ENCODED_LEN];
10426        let mut buf = if avail_len < Self::ENCODED_LEN {
10427            payload_buf[0..avail_len].copy_from_slice(__input);
10428            Bytes::new(&payload_buf)
10429        } else {
10430            Bytes::new(__input)
10431        };
10432        let mut __struct = Self::default();
10433        __struct.custom_mode = buf.get_u32_le();
10434        __struct.intended_custom_mode = buf.get_u32_le();
10435        let tmp = buf.get_u8();
10436        __struct.standard_mode =
10437            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10438                enum_type: "MavStandardMode",
10439                value: tmp as u32,
10440            })?;
10441        Ok(__struct)
10442    }
10443    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10444        let mut __tmp = BytesMut::new(bytes);
10445        #[allow(clippy::absurd_extreme_comparisons)]
10446        #[allow(unused_comparisons)]
10447        if __tmp.remaining() < Self::ENCODED_LEN {
10448            panic!(
10449                "buffer is too small (need {} bytes, but got {})",
10450                Self::ENCODED_LEN,
10451                __tmp.remaining(),
10452            )
10453        }
10454        __tmp.put_u32_le(self.custom_mode);
10455        __tmp.put_u32_le(self.intended_custom_mode);
10456        __tmp.put_u8(self.standard_mode as u8);
10457        if matches!(version, MavlinkVersion::V2) {
10458            let len = __tmp.len();
10459            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10460        } else {
10461            __tmp.len()
10462        }
10463    }
10464}
10465#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10466#[doc = "Data stream status information."]
10467#[doc = ""]
10468#[doc = "ID: 67"]
10469#[derive(Debug, Clone, PartialEq)]
10470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10472#[cfg_attr(feature = "ts", derive(TS))]
10473#[cfg_attr(feature = "ts", ts(export))]
10474pub struct DATA_STREAM_DATA {
10475    #[doc = "The message rate"]
10476    pub message_rate: u16,
10477    #[doc = "The ID of the requested data stream"]
10478    pub stream_id: u8,
10479    #[doc = "1 stream is enabled, 0 stream is stopped."]
10480    pub on_off: u8,
10481}
10482impl DATA_STREAM_DATA {
10483    pub const ENCODED_LEN: usize = 4usize;
10484    pub const DEFAULT: Self = Self {
10485        message_rate: 0_u16,
10486        stream_id: 0_u8,
10487        on_off: 0_u8,
10488    };
10489    #[cfg(feature = "arbitrary")]
10490    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10491        use arbitrary::{Arbitrary, Unstructured};
10492        let mut buf = [0u8; 1024];
10493        rng.fill_bytes(&mut buf);
10494        let mut unstructured = Unstructured::new(&buf);
10495        Self::arbitrary(&mut unstructured).unwrap_or_default()
10496    }
10497}
10498impl Default for DATA_STREAM_DATA {
10499    fn default() -> Self {
10500        Self::DEFAULT.clone()
10501    }
10502}
10503impl MessageData for DATA_STREAM_DATA {
10504    type Message = MavMessage;
10505    const ID: u32 = 67u32;
10506    const NAME: &'static str = "DATA_STREAM";
10507    const EXTRA_CRC: u8 = 21u8;
10508    const ENCODED_LEN: usize = 4usize;
10509    fn deser(
10510        _version: MavlinkVersion,
10511        __input: &[u8],
10512    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10513        let avail_len = __input.len();
10514        let mut payload_buf = [0; Self::ENCODED_LEN];
10515        let mut buf = if avail_len < Self::ENCODED_LEN {
10516            payload_buf[0..avail_len].copy_from_slice(__input);
10517            Bytes::new(&payload_buf)
10518        } else {
10519            Bytes::new(__input)
10520        };
10521        let mut __struct = Self::default();
10522        __struct.message_rate = buf.get_u16_le();
10523        __struct.stream_id = buf.get_u8();
10524        __struct.on_off = buf.get_u8();
10525        Ok(__struct)
10526    }
10527    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10528        let mut __tmp = BytesMut::new(bytes);
10529        #[allow(clippy::absurd_extreme_comparisons)]
10530        #[allow(unused_comparisons)]
10531        if __tmp.remaining() < Self::ENCODED_LEN {
10532            panic!(
10533                "buffer is too small (need {} bytes, but got {})",
10534                Self::ENCODED_LEN,
10535                __tmp.remaining(),
10536            )
10537        }
10538        __tmp.put_u16_le(self.message_rate);
10539        __tmp.put_u8(self.stream_id);
10540        __tmp.put_u8(self.on_off);
10541        if matches!(version, MavlinkVersion::V2) {
10542            let len = __tmp.len();
10543            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10544        } else {
10545            __tmp.len()
10546        }
10547    }
10548}
10549#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10550#[doc = ""]
10551#[doc = "ID: 130"]
10552#[derive(Debug, Clone, PartialEq)]
10553#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10554#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10555#[cfg_attr(feature = "ts", derive(TS))]
10556#[cfg_attr(feature = "ts", ts(export))]
10557pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10558    #[doc = "total data size (set on ACK only)."]
10559    pub size: u32,
10560    #[doc = "Width of a matrix or image."]
10561    pub width: u16,
10562    #[doc = "Height of a matrix or image."]
10563    pub height: u16,
10564    #[doc = "Number of packets being sent (set on ACK only)."]
10565    pub packets: u16,
10566    #[doc = "Type of requested/acknowledged data."]
10567    pub mavtype: MavlinkDataStreamType,
10568    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10569    pub payload: u8,
10570    #[doc = "JPEG quality. Values: [1-100]."]
10571    pub jpg_quality: u8,
10572}
10573impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10574    pub const ENCODED_LEN: usize = 13usize;
10575    pub const DEFAULT: Self = Self {
10576        size: 0_u32,
10577        width: 0_u16,
10578        height: 0_u16,
10579        packets: 0_u16,
10580        mavtype: MavlinkDataStreamType::DEFAULT,
10581        payload: 0_u8,
10582        jpg_quality: 0_u8,
10583    };
10584    #[cfg(feature = "arbitrary")]
10585    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10586        use arbitrary::{Arbitrary, Unstructured};
10587        let mut buf = [0u8; 1024];
10588        rng.fill_bytes(&mut buf);
10589        let mut unstructured = Unstructured::new(&buf);
10590        Self::arbitrary(&mut unstructured).unwrap_or_default()
10591    }
10592}
10593impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10594    fn default() -> Self {
10595        Self::DEFAULT.clone()
10596    }
10597}
10598impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10599    type Message = MavMessage;
10600    const ID: u32 = 130u32;
10601    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10602    const EXTRA_CRC: u8 = 29u8;
10603    const ENCODED_LEN: usize = 13usize;
10604    fn deser(
10605        _version: MavlinkVersion,
10606        __input: &[u8],
10607    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10608        let avail_len = __input.len();
10609        let mut payload_buf = [0; Self::ENCODED_LEN];
10610        let mut buf = if avail_len < Self::ENCODED_LEN {
10611            payload_buf[0..avail_len].copy_from_slice(__input);
10612            Bytes::new(&payload_buf)
10613        } else {
10614            Bytes::new(__input)
10615        };
10616        let mut __struct = Self::default();
10617        __struct.size = buf.get_u32_le();
10618        __struct.width = buf.get_u16_le();
10619        __struct.height = buf.get_u16_le();
10620        __struct.packets = buf.get_u16_le();
10621        let tmp = buf.get_u8();
10622        __struct.mavtype =
10623            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10624                enum_type: "MavlinkDataStreamType",
10625                value: tmp as u32,
10626            })?;
10627        __struct.payload = buf.get_u8();
10628        __struct.jpg_quality = buf.get_u8();
10629        Ok(__struct)
10630    }
10631    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10632        let mut __tmp = BytesMut::new(bytes);
10633        #[allow(clippy::absurd_extreme_comparisons)]
10634        #[allow(unused_comparisons)]
10635        if __tmp.remaining() < Self::ENCODED_LEN {
10636            panic!(
10637                "buffer is too small (need {} bytes, but got {})",
10638                Self::ENCODED_LEN,
10639                __tmp.remaining(),
10640            )
10641        }
10642        __tmp.put_u32_le(self.size);
10643        __tmp.put_u16_le(self.width);
10644        __tmp.put_u16_le(self.height);
10645        __tmp.put_u16_le(self.packets);
10646        __tmp.put_u8(self.mavtype as u8);
10647        __tmp.put_u8(self.payload);
10648        __tmp.put_u8(self.jpg_quality);
10649        if matches!(version, MavlinkVersion::V2) {
10650            let len = __tmp.len();
10651            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10652        } else {
10653            __tmp.len()
10654        }
10655    }
10656}
10657#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10658#[doc = ""]
10659#[doc = "ID: 254"]
10660#[derive(Debug, Clone, PartialEq)]
10661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10663#[cfg_attr(feature = "ts", derive(TS))]
10664#[cfg_attr(feature = "ts", ts(export))]
10665pub struct DEBUG_DATA {
10666    #[doc = "Timestamp (time since system boot)."]
10667    pub time_boot_ms: u32,
10668    #[doc = "DEBUG value"]
10669    pub value: f32,
10670    #[doc = "index of debug variable"]
10671    pub ind: u8,
10672}
10673impl DEBUG_DATA {
10674    pub const ENCODED_LEN: usize = 9usize;
10675    pub const DEFAULT: Self = Self {
10676        time_boot_ms: 0_u32,
10677        value: 0.0_f32,
10678        ind: 0_u8,
10679    };
10680    #[cfg(feature = "arbitrary")]
10681    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10682        use arbitrary::{Arbitrary, Unstructured};
10683        let mut buf = [0u8; 1024];
10684        rng.fill_bytes(&mut buf);
10685        let mut unstructured = Unstructured::new(&buf);
10686        Self::arbitrary(&mut unstructured).unwrap_or_default()
10687    }
10688}
10689impl Default for DEBUG_DATA {
10690    fn default() -> Self {
10691        Self::DEFAULT.clone()
10692    }
10693}
10694impl MessageData for DEBUG_DATA {
10695    type Message = MavMessage;
10696    const ID: u32 = 254u32;
10697    const NAME: &'static str = "DEBUG";
10698    const EXTRA_CRC: u8 = 46u8;
10699    const ENCODED_LEN: usize = 9usize;
10700    fn deser(
10701        _version: MavlinkVersion,
10702        __input: &[u8],
10703    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10704        let avail_len = __input.len();
10705        let mut payload_buf = [0; Self::ENCODED_LEN];
10706        let mut buf = if avail_len < Self::ENCODED_LEN {
10707            payload_buf[0..avail_len].copy_from_slice(__input);
10708            Bytes::new(&payload_buf)
10709        } else {
10710            Bytes::new(__input)
10711        };
10712        let mut __struct = Self::default();
10713        __struct.time_boot_ms = buf.get_u32_le();
10714        __struct.value = buf.get_f32_le();
10715        __struct.ind = buf.get_u8();
10716        Ok(__struct)
10717    }
10718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10719        let mut __tmp = BytesMut::new(bytes);
10720        #[allow(clippy::absurd_extreme_comparisons)]
10721        #[allow(unused_comparisons)]
10722        if __tmp.remaining() < Self::ENCODED_LEN {
10723            panic!(
10724                "buffer is too small (need {} bytes, but got {})",
10725                Self::ENCODED_LEN,
10726                __tmp.remaining(),
10727            )
10728        }
10729        __tmp.put_u32_le(self.time_boot_ms);
10730        __tmp.put_f32_le(self.value);
10731        __tmp.put_u8(self.ind);
10732        if matches!(version, MavlinkVersion::V2) {
10733            let len = __tmp.len();
10734            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10735        } else {
10736            __tmp.len()
10737        }
10738    }
10739}
10740#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10741#[doc = ""]
10742#[doc = "ID: 350"]
10743#[derive(Debug, Clone, PartialEq)]
10744#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10745#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10746#[cfg_attr(feature = "ts", derive(TS))]
10747#[cfg_attr(feature = "ts", ts(export))]
10748pub struct DEBUG_FLOAT_ARRAY_DATA {
10749    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10750    pub time_usec: u64,
10751    #[doc = "Unique ID used to discriminate between arrays"]
10752    pub array_id: u16,
10753    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10754    #[cfg_attr(
10755        feature = "serde",
10756        serde(
10757            serialize_with = "crate::nulstr::serialize::<_, 10>",
10758            deserialize_with = "crate::nulstr::deserialize::<_, 10>"
10759        )
10760    )]
10761    #[cfg_attr(feature = "ts", ts(type = "string"))]
10762    pub name: [u8; 10],
10763    #[doc = "data"]
10764    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10765    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10766    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10767    pub data: [f32; 58],
10768}
10769impl DEBUG_FLOAT_ARRAY_DATA {
10770    pub const ENCODED_LEN: usize = 252usize;
10771    pub const DEFAULT: Self = Self {
10772        time_usec: 0_u64,
10773        array_id: 0_u16,
10774        name: [0_u8; 10usize],
10775        data: [0.0_f32; 58usize],
10776    };
10777    #[cfg(feature = "arbitrary")]
10778    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10779        use arbitrary::{Arbitrary, Unstructured};
10780        let mut buf = [0u8; 1024];
10781        rng.fill_bytes(&mut buf);
10782        let mut unstructured = Unstructured::new(&buf);
10783        Self::arbitrary(&mut unstructured).unwrap_or_default()
10784    }
10785}
10786impl Default for DEBUG_FLOAT_ARRAY_DATA {
10787    fn default() -> Self {
10788        Self::DEFAULT.clone()
10789    }
10790}
10791impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10792    type Message = MavMessage;
10793    const ID: u32 = 350u32;
10794    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10795    const EXTRA_CRC: u8 = 232u8;
10796    const ENCODED_LEN: usize = 252usize;
10797    fn deser(
10798        _version: MavlinkVersion,
10799        __input: &[u8],
10800    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10801        let avail_len = __input.len();
10802        let mut payload_buf = [0; Self::ENCODED_LEN];
10803        let mut buf = if avail_len < Self::ENCODED_LEN {
10804            payload_buf[0..avail_len].copy_from_slice(__input);
10805            Bytes::new(&payload_buf)
10806        } else {
10807            Bytes::new(__input)
10808        };
10809        let mut __struct = Self::default();
10810        __struct.time_usec = buf.get_u64_le();
10811        __struct.array_id = buf.get_u16_le();
10812        for v in &mut __struct.name {
10813            let val = buf.get_u8();
10814            *v = val;
10815        }
10816        for v in &mut __struct.data {
10817            let val = buf.get_f32_le();
10818            *v = val;
10819        }
10820        Ok(__struct)
10821    }
10822    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10823        let mut __tmp = BytesMut::new(bytes);
10824        #[allow(clippy::absurd_extreme_comparisons)]
10825        #[allow(unused_comparisons)]
10826        if __tmp.remaining() < Self::ENCODED_LEN {
10827            panic!(
10828                "buffer is too small (need {} bytes, but got {})",
10829                Self::ENCODED_LEN,
10830                __tmp.remaining(),
10831            )
10832        }
10833        __tmp.put_u64_le(self.time_usec);
10834        __tmp.put_u16_le(self.array_id);
10835        for val in &self.name {
10836            __tmp.put_u8(*val);
10837        }
10838        if matches!(version, MavlinkVersion::V2) {
10839            for val in &self.data {
10840                __tmp.put_f32_le(*val);
10841            }
10842            let len = __tmp.len();
10843            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10844        } else {
10845            __tmp.len()
10846        }
10847    }
10848}
10849#[doc = "To debug something using a named 3D vector."]
10850#[doc = ""]
10851#[doc = "ID: 250"]
10852#[derive(Debug, Clone, PartialEq)]
10853#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10854#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10855#[cfg_attr(feature = "ts", derive(TS))]
10856#[cfg_attr(feature = "ts", ts(export))]
10857pub struct DEBUG_VECT_DATA {
10858    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10859    pub time_usec: u64,
10860    #[doc = "x"]
10861    pub x: f32,
10862    #[doc = "y"]
10863    pub y: f32,
10864    #[doc = "z"]
10865    pub z: f32,
10866    #[doc = "Name"]
10867    #[cfg_attr(
10868        feature = "serde",
10869        serde(
10870            serialize_with = "crate::nulstr::serialize::<_, 10>",
10871            deserialize_with = "crate::nulstr::deserialize::<_, 10>"
10872        )
10873    )]
10874    #[cfg_attr(feature = "ts", ts(type = "string"))]
10875    pub name: [u8; 10],
10876}
10877impl DEBUG_VECT_DATA {
10878    pub const ENCODED_LEN: usize = 30usize;
10879    pub const DEFAULT: Self = Self {
10880        time_usec: 0_u64,
10881        x: 0.0_f32,
10882        y: 0.0_f32,
10883        z: 0.0_f32,
10884        name: [0_u8; 10usize],
10885    };
10886    #[cfg(feature = "arbitrary")]
10887    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10888        use arbitrary::{Arbitrary, Unstructured};
10889        let mut buf = [0u8; 1024];
10890        rng.fill_bytes(&mut buf);
10891        let mut unstructured = Unstructured::new(&buf);
10892        Self::arbitrary(&mut unstructured).unwrap_or_default()
10893    }
10894}
10895impl Default for DEBUG_VECT_DATA {
10896    fn default() -> Self {
10897        Self::DEFAULT.clone()
10898    }
10899}
10900impl MessageData for DEBUG_VECT_DATA {
10901    type Message = MavMessage;
10902    const ID: u32 = 250u32;
10903    const NAME: &'static str = "DEBUG_VECT";
10904    const EXTRA_CRC: u8 = 49u8;
10905    const ENCODED_LEN: usize = 30usize;
10906    fn deser(
10907        _version: MavlinkVersion,
10908        __input: &[u8],
10909    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10910        let avail_len = __input.len();
10911        let mut payload_buf = [0; Self::ENCODED_LEN];
10912        let mut buf = if avail_len < Self::ENCODED_LEN {
10913            payload_buf[0..avail_len].copy_from_slice(__input);
10914            Bytes::new(&payload_buf)
10915        } else {
10916            Bytes::new(__input)
10917        };
10918        let mut __struct = Self::default();
10919        __struct.time_usec = buf.get_u64_le();
10920        __struct.x = buf.get_f32_le();
10921        __struct.y = buf.get_f32_le();
10922        __struct.z = buf.get_f32_le();
10923        for v in &mut __struct.name {
10924            let val = buf.get_u8();
10925            *v = val;
10926        }
10927        Ok(__struct)
10928    }
10929    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10930        let mut __tmp = BytesMut::new(bytes);
10931        #[allow(clippy::absurd_extreme_comparisons)]
10932        #[allow(unused_comparisons)]
10933        if __tmp.remaining() < Self::ENCODED_LEN {
10934            panic!(
10935                "buffer is too small (need {} bytes, but got {})",
10936                Self::ENCODED_LEN,
10937                __tmp.remaining(),
10938            )
10939        }
10940        __tmp.put_u64_le(self.time_usec);
10941        __tmp.put_f32_le(self.x);
10942        __tmp.put_f32_le(self.y);
10943        __tmp.put_f32_le(self.z);
10944        for val in &self.name {
10945            __tmp.put_u8(*val);
10946        }
10947        if matches!(version, MavlinkVersion::V2) {
10948            let len = __tmp.len();
10949            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10950        } else {
10951            __tmp.len()
10952        }
10953    }
10954}
10955#[doc = "Distance sensor information for an onboard rangefinder."]
10956#[doc = ""]
10957#[doc = "ID: 132"]
10958#[derive(Debug, Clone, PartialEq)]
10959#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10961#[cfg_attr(feature = "ts", derive(TS))]
10962#[cfg_attr(feature = "ts", ts(export))]
10963pub struct DISTANCE_SENSOR_DATA {
10964    #[doc = "Timestamp (time since system boot)."]
10965    pub time_boot_ms: u32,
10966    #[doc = "Minimum distance the sensor can measure"]
10967    pub min_distance: u16,
10968    #[doc = "Maximum distance the sensor can measure"]
10969    pub max_distance: u16,
10970    #[doc = "Current distance reading"]
10971    pub current_distance: u16,
10972    #[doc = "Type of distance sensor."]
10973    pub mavtype: MavDistanceSensor,
10974    #[doc = "Onboard ID of the sensor"]
10975    pub id: u8,
10976    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10977    pub orientation: MavSensorOrientation,
10978    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10979    pub covariance: u8,
10980    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10981    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10982    pub horizontal_fov: f32,
10983    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10984    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10985    pub vertical_fov: f32,
10986    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10987    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10988    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10989    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10990    pub quaternion: [f32; 4],
10991    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10992    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10993    pub signal_quality: u8,
10994}
10995impl DISTANCE_SENSOR_DATA {
10996    pub const ENCODED_LEN: usize = 39usize;
10997    pub const DEFAULT: Self = Self {
10998        time_boot_ms: 0_u32,
10999        min_distance: 0_u16,
11000        max_distance: 0_u16,
11001        current_distance: 0_u16,
11002        mavtype: MavDistanceSensor::DEFAULT,
11003        id: 0_u8,
11004        orientation: MavSensorOrientation::DEFAULT,
11005        covariance: 0_u8,
11006        horizontal_fov: 0.0_f32,
11007        vertical_fov: 0.0_f32,
11008        quaternion: [0.0_f32; 4usize],
11009        signal_quality: 0_u8,
11010    };
11011    #[cfg(feature = "arbitrary")]
11012    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11013        use arbitrary::{Arbitrary, Unstructured};
11014        let mut buf = [0u8; 1024];
11015        rng.fill_bytes(&mut buf);
11016        let mut unstructured = Unstructured::new(&buf);
11017        Self::arbitrary(&mut unstructured).unwrap_or_default()
11018    }
11019}
11020impl Default for DISTANCE_SENSOR_DATA {
11021    fn default() -> Self {
11022        Self::DEFAULT.clone()
11023    }
11024}
11025impl MessageData for DISTANCE_SENSOR_DATA {
11026    type Message = MavMessage;
11027    const ID: u32 = 132u32;
11028    const NAME: &'static str = "DISTANCE_SENSOR";
11029    const EXTRA_CRC: u8 = 85u8;
11030    const ENCODED_LEN: usize = 39usize;
11031    fn deser(
11032        _version: MavlinkVersion,
11033        __input: &[u8],
11034    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11035        let avail_len = __input.len();
11036        let mut payload_buf = [0; Self::ENCODED_LEN];
11037        let mut buf = if avail_len < Self::ENCODED_LEN {
11038            payload_buf[0..avail_len].copy_from_slice(__input);
11039            Bytes::new(&payload_buf)
11040        } else {
11041            Bytes::new(__input)
11042        };
11043        let mut __struct = Self::default();
11044        __struct.time_boot_ms = buf.get_u32_le();
11045        __struct.min_distance = buf.get_u16_le();
11046        __struct.max_distance = buf.get_u16_le();
11047        __struct.current_distance = buf.get_u16_le();
11048        let tmp = buf.get_u8();
11049        __struct.mavtype =
11050            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11051                enum_type: "MavDistanceSensor",
11052                value: tmp as u32,
11053            })?;
11054        __struct.id = buf.get_u8();
11055        let tmp = buf.get_u8();
11056        __struct.orientation =
11057            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11058                enum_type: "MavSensorOrientation",
11059                value: tmp as u32,
11060            })?;
11061        __struct.covariance = buf.get_u8();
11062        __struct.horizontal_fov = buf.get_f32_le();
11063        __struct.vertical_fov = buf.get_f32_le();
11064        for v in &mut __struct.quaternion {
11065            let val = buf.get_f32_le();
11066            *v = val;
11067        }
11068        __struct.signal_quality = buf.get_u8();
11069        Ok(__struct)
11070    }
11071    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11072        let mut __tmp = BytesMut::new(bytes);
11073        #[allow(clippy::absurd_extreme_comparisons)]
11074        #[allow(unused_comparisons)]
11075        if __tmp.remaining() < Self::ENCODED_LEN {
11076            panic!(
11077                "buffer is too small (need {} bytes, but got {})",
11078                Self::ENCODED_LEN,
11079                __tmp.remaining(),
11080            )
11081        }
11082        __tmp.put_u32_le(self.time_boot_ms);
11083        __tmp.put_u16_le(self.min_distance);
11084        __tmp.put_u16_le(self.max_distance);
11085        __tmp.put_u16_le(self.current_distance);
11086        __tmp.put_u8(self.mavtype as u8);
11087        __tmp.put_u8(self.id);
11088        __tmp.put_u8(self.orientation as u8);
11089        __tmp.put_u8(self.covariance);
11090        if matches!(version, MavlinkVersion::V2) {
11091            __tmp.put_f32_le(self.horizontal_fov);
11092            __tmp.put_f32_le(self.vertical_fov);
11093            for val in &self.quaternion {
11094                __tmp.put_f32_le(*val);
11095            }
11096            __tmp.put_u8(self.signal_quality);
11097            let len = __tmp.len();
11098            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11099        } else {
11100            __tmp.len()
11101        }
11102    }
11103}
11104#[doc = "EFI status output."]
11105#[doc = ""]
11106#[doc = "ID: 225"]
11107#[derive(Debug, Clone, PartialEq)]
11108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11109#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11110#[cfg_attr(feature = "ts", derive(TS))]
11111#[cfg_attr(feature = "ts", ts(export))]
11112pub struct EFI_STATUS_DATA {
11113    #[doc = "ECU index"]
11114    pub ecu_index: f32,
11115    #[doc = "RPM"]
11116    pub rpm: f32,
11117    #[doc = "Fuel consumed"]
11118    pub fuel_consumed: f32,
11119    #[doc = "Fuel flow rate"]
11120    pub fuel_flow: f32,
11121    #[doc = "Engine load"]
11122    pub engine_load: f32,
11123    #[doc = "Throttle position"]
11124    pub throttle_position: f32,
11125    #[doc = "Spark dwell time"]
11126    pub spark_dwell_time: f32,
11127    #[doc = "Barometric pressure"]
11128    pub barometric_pressure: f32,
11129    #[doc = "Intake manifold pressure("]
11130    pub intake_manifold_pressure: f32,
11131    #[doc = "Intake manifold temperature"]
11132    pub intake_manifold_temperature: f32,
11133    #[doc = "Cylinder head temperature"]
11134    pub cylinder_head_temperature: f32,
11135    #[doc = "Ignition timing (Crank angle degrees)"]
11136    pub ignition_timing: f32,
11137    #[doc = "Injection time"]
11138    pub injection_time: f32,
11139    #[doc = "Exhaust gas temperature"]
11140    pub exhaust_gas_temperature: f32,
11141    #[doc = "Output throttle"]
11142    pub throttle_out: f32,
11143    #[doc = "Pressure/temperature compensation"]
11144    pub pt_compensation: f32,
11145    #[doc = "EFI health status"]
11146    pub health: u8,
11147    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
11148    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11149    pub ignition_voltage: f32,
11150    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11151    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11152    pub fuel_pressure: f32,
11153}
11154impl EFI_STATUS_DATA {
11155    pub const ENCODED_LEN: usize = 73usize;
11156    pub const DEFAULT: Self = Self {
11157        ecu_index: 0.0_f32,
11158        rpm: 0.0_f32,
11159        fuel_consumed: 0.0_f32,
11160        fuel_flow: 0.0_f32,
11161        engine_load: 0.0_f32,
11162        throttle_position: 0.0_f32,
11163        spark_dwell_time: 0.0_f32,
11164        barometric_pressure: 0.0_f32,
11165        intake_manifold_pressure: 0.0_f32,
11166        intake_manifold_temperature: 0.0_f32,
11167        cylinder_head_temperature: 0.0_f32,
11168        ignition_timing: 0.0_f32,
11169        injection_time: 0.0_f32,
11170        exhaust_gas_temperature: 0.0_f32,
11171        throttle_out: 0.0_f32,
11172        pt_compensation: 0.0_f32,
11173        health: 0_u8,
11174        ignition_voltage: 0.0_f32,
11175        fuel_pressure: 0.0_f32,
11176    };
11177    #[cfg(feature = "arbitrary")]
11178    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11179        use arbitrary::{Arbitrary, Unstructured};
11180        let mut buf = [0u8; 1024];
11181        rng.fill_bytes(&mut buf);
11182        let mut unstructured = Unstructured::new(&buf);
11183        Self::arbitrary(&mut unstructured).unwrap_or_default()
11184    }
11185}
11186impl Default for EFI_STATUS_DATA {
11187    fn default() -> Self {
11188        Self::DEFAULT.clone()
11189    }
11190}
11191impl MessageData for EFI_STATUS_DATA {
11192    type Message = MavMessage;
11193    const ID: u32 = 225u32;
11194    const NAME: &'static str = "EFI_STATUS";
11195    const EXTRA_CRC: u8 = 208u8;
11196    const ENCODED_LEN: usize = 73usize;
11197    fn deser(
11198        _version: MavlinkVersion,
11199        __input: &[u8],
11200    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11201        let avail_len = __input.len();
11202        let mut payload_buf = [0; Self::ENCODED_LEN];
11203        let mut buf = if avail_len < Self::ENCODED_LEN {
11204            payload_buf[0..avail_len].copy_from_slice(__input);
11205            Bytes::new(&payload_buf)
11206        } else {
11207            Bytes::new(__input)
11208        };
11209        let mut __struct = Self::default();
11210        __struct.ecu_index = buf.get_f32_le();
11211        __struct.rpm = buf.get_f32_le();
11212        __struct.fuel_consumed = buf.get_f32_le();
11213        __struct.fuel_flow = buf.get_f32_le();
11214        __struct.engine_load = buf.get_f32_le();
11215        __struct.throttle_position = buf.get_f32_le();
11216        __struct.spark_dwell_time = buf.get_f32_le();
11217        __struct.barometric_pressure = buf.get_f32_le();
11218        __struct.intake_manifold_pressure = buf.get_f32_le();
11219        __struct.intake_manifold_temperature = buf.get_f32_le();
11220        __struct.cylinder_head_temperature = buf.get_f32_le();
11221        __struct.ignition_timing = buf.get_f32_le();
11222        __struct.injection_time = buf.get_f32_le();
11223        __struct.exhaust_gas_temperature = buf.get_f32_le();
11224        __struct.throttle_out = buf.get_f32_le();
11225        __struct.pt_compensation = buf.get_f32_le();
11226        __struct.health = buf.get_u8();
11227        __struct.ignition_voltage = buf.get_f32_le();
11228        __struct.fuel_pressure = buf.get_f32_le();
11229        Ok(__struct)
11230    }
11231    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11232        let mut __tmp = BytesMut::new(bytes);
11233        #[allow(clippy::absurd_extreme_comparisons)]
11234        #[allow(unused_comparisons)]
11235        if __tmp.remaining() < Self::ENCODED_LEN {
11236            panic!(
11237                "buffer is too small (need {} bytes, but got {})",
11238                Self::ENCODED_LEN,
11239                __tmp.remaining(),
11240            )
11241        }
11242        __tmp.put_f32_le(self.ecu_index);
11243        __tmp.put_f32_le(self.rpm);
11244        __tmp.put_f32_le(self.fuel_consumed);
11245        __tmp.put_f32_le(self.fuel_flow);
11246        __tmp.put_f32_le(self.engine_load);
11247        __tmp.put_f32_le(self.throttle_position);
11248        __tmp.put_f32_le(self.spark_dwell_time);
11249        __tmp.put_f32_le(self.barometric_pressure);
11250        __tmp.put_f32_le(self.intake_manifold_pressure);
11251        __tmp.put_f32_le(self.intake_manifold_temperature);
11252        __tmp.put_f32_le(self.cylinder_head_temperature);
11253        __tmp.put_f32_le(self.ignition_timing);
11254        __tmp.put_f32_le(self.injection_time);
11255        __tmp.put_f32_le(self.exhaust_gas_temperature);
11256        __tmp.put_f32_le(self.throttle_out);
11257        __tmp.put_f32_le(self.pt_compensation);
11258        __tmp.put_u8(self.health);
11259        if matches!(version, MavlinkVersion::V2) {
11260            __tmp.put_f32_le(self.ignition_voltage);
11261            __tmp.put_f32_le(self.fuel_pressure);
11262            let len = __tmp.len();
11263            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11264        } else {
11265            __tmp.len()
11266        }
11267    }
11268}
11269#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11270#[doc = ""]
11271#[doc = "ID: 131"]
11272#[derive(Debug, Clone, PartialEq)]
11273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11274#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11275#[cfg_attr(feature = "ts", derive(TS))]
11276#[cfg_attr(feature = "ts", ts(export))]
11277pub struct ENCAPSULATED_DATA_DATA {
11278    #[doc = "sequence number (starting with 0 on every transmission)"]
11279    pub seqnr: u16,
11280    #[doc = "image data bytes"]
11281    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11282    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11283    pub data: [u8; 253],
11284}
11285impl ENCAPSULATED_DATA_DATA {
11286    pub const ENCODED_LEN: usize = 255usize;
11287    pub const DEFAULT: Self = Self {
11288        seqnr: 0_u16,
11289        data: [0_u8; 253usize],
11290    };
11291    #[cfg(feature = "arbitrary")]
11292    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11293        use arbitrary::{Arbitrary, Unstructured};
11294        let mut buf = [0u8; 1024];
11295        rng.fill_bytes(&mut buf);
11296        let mut unstructured = Unstructured::new(&buf);
11297        Self::arbitrary(&mut unstructured).unwrap_or_default()
11298    }
11299}
11300impl Default for ENCAPSULATED_DATA_DATA {
11301    fn default() -> Self {
11302        Self::DEFAULT.clone()
11303    }
11304}
11305impl MessageData for ENCAPSULATED_DATA_DATA {
11306    type Message = MavMessage;
11307    const ID: u32 = 131u32;
11308    const NAME: &'static str = "ENCAPSULATED_DATA";
11309    const EXTRA_CRC: u8 = 223u8;
11310    const ENCODED_LEN: usize = 255usize;
11311    fn deser(
11312        _version: MavlinkVersion,
11313        __input: &[u8],
11314    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11315        let avail_len = __input.len();
11316        let mut payload_buf = [0; Self::ENCODED_LEN];
11317        let mut buf = if avail_len < Self::ENCODED_LEN {
11318            payload_buf[0..avail_len].copy_from_slice(__input);
11319            Bytes::new(&payload_buf)
11320        } else {
11321            Bytes::new(__input)
11322        };
11323        let mut __struct = Self::default();
11324        __struct.seqnr = buf.get_u16_le();
11325        for v in &mut __struct.data {
11326            let val = buf.get_u8();
11327            *v = val;
11328        }
11329        Ok(__struct)
11330    }
11331    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11332        let mut __tmp = BytesMut::new(bytes);
11333        #[allow(clippy::absurd_extreme_comparisons)]
11334        #[allow(unused_comparisons)]
11335        if __tmp.remaining() < Self::ENCODED_LEN {
11336            panic!(
11337                "buffer is too small (need {} bytes, but got {})",
11338                Self::ENCODED_LEN,
11339                __tmp.remaining(),
11340            )
11341        }
11342        __tmp.put_u16_le(self.seqnr);
11343        for val in &self.data {
11344            __tmp.put_u8(*val);
11345        }
11346        if matches!(version, MavlinkVersion::V2) {
11347            let len = __tmp.len();
11348            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11349        } else {
11350            __tmp.len()
11351        }
11352    }
11353}
11354#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11355#[doc = ""]
11356#[doc = "ID: 290"]
11357#[derive(Debug, Clone, PartialEq)]
11358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11359#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11360#[cfg_attr(feature = "ts", derive(TS))]
11361#[cfg_attr(feature = "ts", ts(export))]
11362pub struct ESC_INFO_DATA {
11363    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11364    pub time_usec: u64,
11365    #[doc = "Number of reported errors by each ESC since boot."]
11366    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11367    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11368    pub error_count: [u32; 4],
11369    #[doc = "Counter of data packets received."]
11370    pub counter: u16,
11371    #[doc = "Bitmap of ESC failure flags."]
11372    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11373    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11374    pub failure_flags: [u16; 4],
11375    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11376    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11377    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11378    pub temperature: [i16; 4],
11379    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11380    pub index: u8,
11381    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11382    pub count: u8,
11383    #[doc = "Connection type protocol for all ESC."]
11384    pub connection_type: EscConnectionType,
11385    #[doc = "Information regarding online/offline status of each ESC."]
11386    pub info: u8,
11387}
11388impl ESC_INFO_DATA {
11389    pub const ENCODED_LEN: usize = 46usize;
11390    pub const DEFAULT: Self = Self {
11391        time_usec: 0_u64,
11392        error_count: [0_u32; 4usize],
11393        counter: 0_u16,
11394        failure_flags: [0_u16; 4usize],
11395        temperature: [0_i16; 4usize],
11396        index: 0_u8,
11397        count: 0_u8,
11398        connection_type: EscConnectionType::DEFAULT,
11399        info: 0_u8,
11400    };
11401    #[cfg(feature = "arbitrary")]
11402    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11403        use arbitrary::{Arbitrary, Unstructured};
11404        let mut buf = [0u8; 1024];
11405        rng.fill_bytes(&mut buf);
11406        let mut unstructured = Unstructured::new(&buf);
11407        Self::arbitrary(&mut unstructured).unwrap_or_default()
11408    }
11409}
11410impl Default for ESC_INFO_DATA {
11411    fn default() -> Self {
11412        Self::DEFAULT.clone()
11413    }
11414}
11415impl MessageData for ESC_INFO_DATA {
11416    type Message = MavMessage;
11417    const ID: u32 = 290u32;
11418    const NAME: &'static str = "ESC_INFO";
11419    const EXTRA_CRC: u8 = 251u8;
11420    const ENCODED_LEN: usize = 46usize;
11421    fn deser(
11422        _version: MavlinkVersion,
11423        __input: &[u8],
11424    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11425        let avail_len = __input.len();
11426        let mut payload_buf = [0; Self::ENCODED_LEN];
11427        let mut buf = if avail_len < Self::ENCODED_LEN {
11428            payload_buf[0..avail_len].copy_from_slice(__input);
11429            Bytes::new(&payload_buf)
11430        } else {
11431            Bytes::new(__input)
11432        };
11433        let mut __struct = Self::default();
11434        __struct.time_usec = buf.get_u64_le();
11435        for v in &mut __struct.error_count {
11436            let val = buf.get_u32_le();
11437            *v = val;
11438        }
11439        __struct.counter = buf.get_u16_le();
11440        for v in &mut __struct.failure_flags {
11441            let val = buf.get_u16_le();
11442            *v = val;
11443        }
11444        for v in &mut __struct.temperature {
11445            let val = buf.get_i16_le();
11446            *v = val;
11447        }
11448        __struct.index = buf.get_u8();
11449        __struct.count = buf.get_u8();
11450        let tmp = buf.get_u8();
11451        __struct.connection_type =
11452            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11453                enum_type: "EscConnectionType",
11454                value: tmp as u32,
11455            })?;
11456        __struct.info = buf.get_u8();
11457        Ok(__struct)
11458    }
11459    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11460        let mut __tmp = BytesMut::new(bytes);
11461        #[allow(clippy::absurd_extreme_comparisons)]
11462        #[allow(unused_comparisons)]
11463        if __tmp.remaining() < Self::ENCODED_LEN {
11464            panic!(
11465                "buffer is too small (need {} bytes, but got {})",
11466                Self::ENCODED_LEN,
11467                __tmp.remaining(),
11468            )
11469        }
11470        __tmp.put_u64_le(self.time_usec);
11471        for val in &self.error_count {
11472            __tmp.put_u32_le(*val);
11473        }
11474        __tmp.put_u16_le(self.counter);
11475        for val in &self.failure_flags {
11476            __tmp.put_u16_le(*val);
11477        }
11478        for val in &self.temperature {
11479            __tmp.put_i16_le(*val);
11480        }
11481        __tmp.put_u8(self.index);
11482        __tmp.put_u8(self.count);
11483        __tmp.put_u8(self.connection_type as u8);
11484        __tmp.put_u8(self.info);
11485        if matches!(version, MavlinkVersion::V2) {
11486            let len = __tmp.len();
11487            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11488        } else {
11489            __tmp.len()
11490        }
11491    }
11492}
11493#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11494#[doc = ""]
11495#[doc = "ID: 291"]
11496#[derive(Debug, Clone, PartialEq)]
11497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11499#[cfg_attr(feature = "ts", derive(TS))]
11500#[cfg_attr(feature = "ts", ts(export))]
11501pub struct ESC_STATUS_DATA {
11502    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11503    pub time_usec: u64,
11504    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11505    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11506    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11507    pub rpm: [i32; 4],
11508    #[doc = "Voltage measured from each ESC."]
11509    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11510    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11511    pub voltage: [f32; 4],
11512    #[doc = "Current measured from each ESC."]
11513    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11514    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11515    pub current: [f32; 4],
11516    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11517    pub index: u8,
11518}
11519impl ESC_STATUS_DATA {
11520    pub const ENCODED_LEN: usize = 57usize;
11521    pub const DEFAULT: Self = Self {
11522        time_usec: 0_u64,
11523        rpm: [0_i32; 4usize],
11524        voltage: [0.0_f32; 4usize],
11525        current: [0.0_f32; 4usize],
11526        index: 0_u8,
11527    };
11528    #[cfg(feature = "arbitrary")]
11529    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11530        use arbitrary::{Arbitrary, Unstructured};
11531        let mut buf = [0u8; 1024];
11532        rng.fill_bytes(&mut buf);
11533        let mut unstructured = Unstructured::new(&buf);
11534        Self::arbitrary(&mut unstructured).unwrap_or_default()
11535    }
11536}
11537impl Default for ESC_STATUS_DATA {
11538    fn default() -> Self {
11539        Self::DEFAULT.clone()
11540    }
11541}
11542impl MessageData for ESC_STATUS_DATA {
11543    type Message = MavMessage;
11544    const ID: u32 = 291u32;
11545    const NAME: &'static str = "ESC_STATUS";
11546    const EXTRA_CRC: u8 = 10u8;
11547    const ENCODED_LEN: usize = 57usize;
11548    fn deser(
11549        _version: MavlinkVersion,
11550        __input: &[u8],
11551    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11552        let avail_len = __input.len();
11553        let mut payload_buf = [0; Self::ENCODED_LEN];
11554        let mut buf = if avail_len < Self::ENCODED_LEN {
11555            payload_buf[0..avail_len].copy_from_slice(__input);
11556            Bytes::new(&payload_buf)
11557        } else {
11558            Bytes::new(__input)
11559        };
11560        let mut __struct = Self::default();
11561        __struct.time_usec = buf.get_u64_le();
11562        for v in &mut __struct.rpm {
11563            let val = buf.get_i32_le();
11564            *v = val;
11565        }
11566        for v in &mut __struct.voltage {
11567            let val = buf.get_f32_le();
11568            *v = val;
11569        }
11570        for v in &mut __struct.current {
11571            let val = buf.get_f32_le();
11572            *v = val;
11573        }
11574        __struct.index = buf.get_u8();
11575        Ok(__struct)
11576    }
11577    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11578        let mut __tmp = BytesMut::new(bytes);
11579        #[allow(clippy::absurd_extreme_comparisons)]
11580        #[allow(unused_comparisons)]
11581        if __tmp.remaining() < Self::ENCODED_LEN {
11582            panic!(
11583                "buffer is too small (need {} bytes, but got {})",
11584                Self::ENCODED_LEN,
11585                __tmp.remaining(),
11586            )
11587        }
11588        __tmp.put_u64_le(self.time_usec);
11589        for val in &self.rpm {
11590            __tmp.put_i32_le(*val);
11591        }
11592        for val in &self.voltage {
11593            __tmp.put_f32_le(*val);
11594        }
11595        for val in &self.current {
11596            __tmp.put_f32_le(*val);
11597        }
11598        __tmp.put_u8(self.index);
11599        if matches!(version, MavlinkVersion::V2) {
11600            let len = __tmp.len();
11601            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11602        } else {
11603            __tmp.len()
11604        }
11605    }
11606}
11607#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11608#[doc = ""]
11609#[doc = "ID: 230"]
11610#[derive(Debug, Clone, PartialEq)]
11611#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11612#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11613#[cfg_attr(feature = "ts", derive(TS))]
11614#[cfg_attr(feature = "ts", ts(export))]
11615pub struct ESTIMATOR_STATUS_DATA {
11616    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11617    pub time_usec: u64,
11618    #[doc = "Velocity innovation test ratio"]
11619    pub vel_ratio: f32,
11620    #[doc = "Horizontal position innovation test ratio"]
11621    pub pos_horiz_ratio: f32,
11622    #[doc = "Vertical position innovation test ratio"]
11623    pub pos_vert_ratio: f32,
11624    #[doc = "Magnetometer innovation test ratio"]
11625    pub mag_ratio: f32,
11626    #[doc = "Height above terrain innovation test ratio"]
11627    pub hagl_ratio: f32,
11628    #[doc = "True airspeed innovation test ratio"]
11629    pub tas_ratio: f32,
11630    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11631    pub pos_horiz_accuracy: f32,
11632    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11633    pub pos_vert_accuracy: f32,
11634    #[doc = "Bitmap indicating which EKF outputs are valid."]
11635    pub flags: EstimatorStatusFlags,
11636}
11637impl ESTIMATOR_STATUS_DATA {
11638    pub const ENCODED_LEN: usize = 42usize;
11639    pub const DEFAULT: Self = Self {
11640        time_usec: 0_u64,
11641        vel_ratio: 0.0_f32,
11642        pos_horiz_ratio: 0.0_f32,
11643        pos_vert_ratio: 0.0_f32,
11644        mag_ratio: 0.0_f32,
11645        hagl_ratio: 0.0_f32,
11646        tas_ratio: 0.0_f32,
11647        pos_horiz_accuracy: 0.0_f32,
11648        pos_vert_accuracy: 0.0_f32,
11649        flags: EstimatorStatusFlags::DEFAULT,
11650    };
11651    #[cfg(feature = "arbitrary")]
11652    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11653        use arbitrary::{Arbitrary, Unstructured};
11654        let mut buf = [0u8; 1024];
11655        rng.fill_bytes(&mut buf);
11656        let mut unstructured = Unstructured::new(&buf);
11657        Self::arbitrary(&mut unstructured).unwrap_or_default()
11658    }
11659}
11660impl Default for ESTIMATOR_STATUS_DATA {
11661    fn default() -> Self {
11662        Self::DEFAULT.clone()
11663    }
11664}
11665impl MessageData for ESTIMATOR_STATUS_DATA {
11666    type Message = MavMessage;
11667    const ID: u32 = 230u32;
11668    const NAME: &'static str = "ESTIMATOR_STATUS";
11669    const EXTRA_CRC: u8 = 163u8;
11670    const ENCODED_LEN: usize = 42usize;
11671    fn deser(
11672        _version: MavlinkVersion,
11673        __input: &[u8],
11674    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11675        let avail_len = __input.len();
11676        let mut payload_buf = [0; Self::ENCODED_LEN];
11677        let mut buf = if avail_len < Self::ENCODED_LEN {
11678            payload_buf[0..avail_len].copy_from_slice(__input);
11679            Bytes::new(&payload_buf)
11680        } else {
11681            Bytes::new(__input)
11682        };
11683        let mut __struct = Self::default();
11684        __struct.time_usec = buf.get_u64_le();
11685        __struct.vel_ratio = buf.get_f32_le();
11686        __struct.pos_horiz_ratio = buf.get_f32_le();
11687        __struct.pos_vert_ratio = buf.get_f32_le();
11688        __struct.mag_ratio = buf.get_f32_le();
11689        __struct.hagl_ratio = buf.get_f32_le();
11690        __struct.tas_ratio = buf.get_f32_le();
11691        __struct.pos_horiz_accuracy = buf.get_f32_le();
11692        __struct.pos_vert_accuracy = buf.get_f32_le();
11693        let tmp = buf.get_u16_le();
11694        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11695            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11696                flag_type: "EstimatorStatusFlags",
11697                value: tmp as u32,
11698            })?;
11699        Ok(__struct)
11700    }
11701    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11702        let mut __tmp = BytesMut::new(bytes);
11703        #[allow(clippy::absurd_extreme_comparisons)]
11704        #[allow(unused_comparisons)]
11705        if __tmp.remaining() < Self::ENCODED_LEN {
11706            panic!(
11707                "buffer is too small (need {} bytes, but got {})",
11708                Self::ENCODED_LEN,
11709                __tmp.remaining(),
11710            )
11711        }
11712        __tmp.put_u64_le(self.time_usec);
11713        __tmp.put_f32_le(self.vel_ratio);
11714        __tmp.put_f32_le(self.pos_horiz_ratio);
11715        __tmp.put_f32_le(self.pos_vert_ratio);
11716        __tmp.put_f32_le(self.mag_ratio);
11717        __tmp.put_f32_le(self.hagl_ratio);
11718        __tmp.put_f32_le(self.tas_ratio);
11719        __tmp.put_f32_le(self.pos_horiz_accuracy);
11720        __tmp.put_f32_le(self.pos_vert_accuracy);
11721        __tmp.put_u16_le(self.flags.bits());
11722        if matches!(version, MavlinkVersion::V2) {
11723            let len = __tmp.len();
11724            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11725        } else {
11726            __tmp.len()
11727        }
11728    }
11729}
11730#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11731#[doc = ""]
11732#[doc = "ID: 410"]
11733#[derive(Debug, Clone, PartialEq)]
11734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11735#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11736#[cfg_attr(feature = "ts", derive(TS))]
11737#[cfg_attr(feature = "ts", ts(export))]
11738pub struct EVENT_DATA {
11739    #[doc = "Event ID (as defined in the component metadata)"]
11740    pub id: u32,
11741    #[doc = "Timestamp (time since system boot when the event happened)."]
11742    pub event_time_boot_ms: u32,
11743    #[doc = "Sequence number."]
11744    pub sequence: u16,
11745    #[doc = "Component ID"]
11746    pub destination_component: u8,
11747    #[doc = "System ID"]
11748    pub destination_system: u8,
11749    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11750    pub log_levels: u8,
11751    #[doc = "Arguments (depend on event ID)."]
11752    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11753    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11754    pub arguments: [u8; 40],
11755}
11756impl EVENT_DATA {
11757    pub const ENCODED_LEN: usize = 53usize;
11758    pub const DEFAULT: Self = Self {
11759        id: 0_u32,
11760        event_time_boot_ms: 0_u32,
11761        sequence: 0_u16,
11762        destination_component: 0_u8,
11763        destination_system: 0_u8,
11764        log_levels: 0_u8,
11765        arguments: [0_u8; 40usize],
11766    };
11767    #[cfg(feature = "arbitrary")]
11768    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11769        use arbitrary::{Arbitrary, Unstructured};
11770        let mut buf = [0u8; 1024];
11771        rng.fill_bytes(&mut buf);
11772        let mut unstructured = Unstructured::new(&buf);
11773        Self::arbitrary(&mut unstructured).unwrap_or_default()
11774    }
11775}
11776impl Default for EVENT_DATA {
11777    fn default() -> Self {
11778        Self::DEFAULT.clone()
11779    }
11780}
11781impl MessageData for EVENT_DATA {
11782    type Message = MavMessage;
11783    const ID: u32 = 410u32;
11784    const NAME: &'static str = "EVENT";
11785    const EXTRA_CRC: u8 = 160u8;
11786    const ENCODED_LEN: usize = 53usize;
11787    fn deser(
11788        _version: MavlinkVersion,
11789        __input: &[u8],
11790    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11791        let avail_len = __input.len();
11792        let mut payload_buf = [0; Self::ENCODED_LEN];
11793        let mut buf = if avail_len < Self::ENCODED_LEN {
11794            payload_buf[0..avail_len].copy_from_slice(__input);
11795            Bytes::new(&payload_buf)
11796        } else {
11797            Bytes::new(__input)
11798        };
11799        let mut __struct = Self::default();
11800        __struct.id = buf.get_u32_le();
11801        __struct.event_time_boot_ms = buf.get_u32_le();
11802        __struct.sequence = buf.get_u16_le();
11803        __struct.destination_component = buf.get_u8();
11804        __struct.destination_system = buf.get_u8();
11805        __struct.log_levels = buf.get_u8();
11806        for v in &mut __struct.arguments {
11807            let val = buf.get_u8();
11808            *v = val;
11809        }
11810        Ok(__struct)
11811    }
11812    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11813        let mut __tmp = BytesMut::new(bytes);
11814        #[allow(clippy::absurd_extreme_comparisons)]
11815        #[allow(unused_comparisons)]
11816        if __tmp.remaining() < Self::ENCODED_LEN {
11817            panic!(
11818                "buffer is too small (need {} bytes, but got {})",
11819                Self::ENCODED_LEN,
11820                __tmp.remaining(),
11821            )
11822        }
11823        __tmp.put_u32_le(self.id);
11824        __tmp.put_u32_le(self.event_time_boot_ms);
11825        __tmp.put_u16_le(self.sequence);
11826        __tmp.put_u8(self.destination_component);
11827        __tmp.put_u8(self.destination_system);
11828        __tmp.put_u8(self.log_levels);
11829        for val in &self.arguments {
11830            __tmp.put_u8(*val);
11831        }
11832        if matches!(version, MavlinkVersion::V2) {
11833            let len = __tmp.len();
11834            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11835        } else {
11836            __tmp.len()
11837        }
11838    }
11839}
11840#[doc = "Provides state for additional features."]
11841#[doc = ""]
11842#[doc = "ID: 245"]
11843#[derive(Debug, Clone, PartialEq)]
11844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11846#[cfg_attr(feature = "ts", derive(TS))]
11847#[cfg_attr(feature = "ts", ts(export))]
11848pub struct EXTENDED_SYS_STATE_DATA {
11849    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11850    pub vtol_state: MavVtolState,
11851    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11852    pub landed_state: MavLandedState,
11853}
11854impl EXTENDED_SYS_STATE_DATA {
11855    pub const ENCODED_LEN: usize = 2usize;
11856    pub const DEFAULT: Self = Self {
11857        vtol_state: MavVtolState::DEFAULT,
11858        landed_state: MavLandedState::DEFAULT,
11859    };
11860    #[cfg(feature = "arbitrary")]
11861    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11862        use arbitrary::{Arbitrary, Unstructured};
11863        let mut buf = [0u8; 1024];
11864        rng.fill_bytes(&mut buf);
11865        let mut unstructured = Unstructured::new(&buf);
11866        Self::arbitrary(&mut unstructured).unwrap_or_default()
11867    }
11868}
11869impl Default for EXTENDED_SYS_STATE_DATA {
11870    fn default() -> Self {
11871        Self::DEFAULT.clone()
11872    }
11873}
11874impl MessageData for EXTENDED_SYS_STATE_DATA {
11875    type Message = MavMessage;
11876    const ID: u32 = 245u32;
11877    const NAME: &'static str = "EXTENDED_SYS_STATE";
11878    const EXTRA_CRC: u8 = 130u8;
11879    const ENCODED_LEN: usize = 2usize;
11880    fn deser(
11881        _version: MavlinkVersion,
11882        __input: &[u8],
11883    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11884        let avail_len = __input.len();
11885        let mut payload_buf = [0; Self::ENCODED_LEN];
11886        let mut buf = if avail_len < Self::ENCODED_LEN {
11887            payload_buf[0..avail_len].copy_from_slice(__input);
11888            Bytes::new(&payload_buf)
11889        } else {
11890            Bytes::new(__input)
11891        };
11892        let mut __struct = Self::default();
11893        let tmp = buf.get_u8();
11894        __struct.vtol_state =
11895            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11896                enum_type: "MavVtolState",
11897                value: tmp as u32,
11898            })?;
11899        let tmp = buf.get_u8();
11900        __struct.landed_state =
11901            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11902                enum_type: "MavLandedState",
11903                value: tmp as u32,
11904            })?;
11905        Ok(__struct)
11906    }
11907    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11908        let mut __tmp = BytesMut::new(bytes);
11909        #[allow(clippy::absurd_extreme_comparisons)]
11910        #[allow(unused_comparisons)]
11911        if __tmp.remaining() < Self::ENCODED_LEN {
11912            panic!(
11913                "buffer is too small (need {} bytes, but got {})",
11914                Self::ENCODED_LEN,
11915                __tmp.remaining(),
11916            )
11917        }
11918        __tmp.put_u8(self.vtol_state as u8);
11919        __tmp.put_u8(self.landed_state as u8);
11920        if matches!(version, MavlinkVersion::V2) {
11921            let len = __tmp.len();
11922            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11923        } else {
11924            __tmp.len()
11925        }
11926    }
11927}
11928#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11929#[doc = ""]
11930#[doc = "ID: 162"]
11931#[derive(Debug, Clone, PartialEq)]
11932#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11934#[cfg_attr(feature = "ts", derive(TS))]
11935#[cfg_attr(feature = "ts", ts(export))]
11936pub struct FENCE_STATUS_DATA {
11937    #[doc = "Time (since boot) of last breach."]
11938    pub breach_time: u32,
11939    #[doc = "Number of fence breaches."]
11940    pub breach_count: u16,
11941    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11942    pub breach_status: u8,
11943    #[doc = "Last breach type."]
11944    pub breach_type: FenceBreach,
11945    #[doc = "Active action to prevent fence breach"]
11946    #[cfg_attr(feature = "serde", serde(default))]
11947    pub breach_mitigation: FenceMitigate,
11948}
11949impl FENCE_STATUS_DATA {
11950    pub const ENCODED_LEN: usize = 9usize;
11951    pub const DEFAULT: Self = Self {
11952        breach_time: 0_u32,
11953        breach_count: 0_u16,
11954        breach_status: 0_u8,
11955        breach_type: FenceBreach::DEFAULT,
11956        breach_mitigation: FenceMitigate::DEFAULT,
11957    };
11958    #[cfg(feature = "arbitrary")]
11959    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11960        use arbitrary::{Arbitrary, Unstructured};
11961        let mut buf = [0u8; 1024];
11962        rng.fill_bytes(&mut buf);
11963        let mut unstructured = Unstructured::new(&buf);
11964        Self::arbitrary(&mut unstructured).unwrap_or_default()
11965    }
11966}
11967impl Default for FENCE_STATUS_DATA {
11968    fn default() -> Self {
11969        Self::DEFAULT.clone()
11970    }
11971}
11972impl MessageData for FENCE_STATUS_DATA {
11973    type Message = MavMessage;
11974    const ID: u32 = 162u32;
11975    const NAME: &'static str = "FENCE_STATUS";
11976    const EXTRA_CRC: u8 = 189u8;
11977    const ENCODED_LEN: usize = 9usize;
11978    fn deser(
11979        _version: MavlinkVersion,
11980        __input: &[u8],
11981    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11982        let avail_len = __input.len();
11983        let mut payload_buf = [0; Self::ENCODED_LEN];
11984        let mut buf = if avail_len < Self::ENCODED_LEN {
11985            payload_buf[0..avail_len].copy_from_slice(__input);
11986            Bytes::new(&payload_buf)
11987        } else {
11988            Bytes::new(__input)
11989        };
11990        let mut __struct = Self::default();
11991        __struct.breach_time = buf.get_u32_le();
11992        __struct.breach_count = buf.get_u16_le();
11993        __struct.breach_status = buf.get_u8();
11994        let tmp = buf.get_u8();
11995        __struct.breach_type =
11996            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11997                enum_type: "FenceBreach",
11998                value: tmp as u32,
11999            })?;
12000        let tmp = buf.get_u8();
12001        __struct.breach_mitigation =
12002            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12003                enum_type: "FenceMitigate",
12004                value: tmp as u32,
12005            })?;
12006        Ok(__struct)
12007    }
12008    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12009        let mut __tmp = BytesMut::new(bytes);
12010        #[allow(clippy::absurd_extreme_comparisons)]
12011        #[allow(unused_comparisons)]
12012        if __tmp.remaining() < Self::ENCODED_LEN {
12013            panic!(
12014                "buffer is too small (need {} bytes, but got {})",
12015                Self::ENCODED_LEN,
12016                __tmp.remaining(),
12017            )
12018        }
12019        __tmp.put_u32_le(self.breach_time);
12020        __tmp.put_u16_le(self.breach_count);
12021        __tmp.put_u8(self.breach_status);
12022        __tmp.put_u8(self.breach_type as u8);
12023        if matches!(version, MavlinkVersion::V2) {
12024            __tmp.put_u8(self.breach_mitigation as u8);
12025            let len = __tmp.len();
12026            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12027        } else {
12028            __tmp.len()
12029        }
12030    }
12031}
12032#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
12033#[doc = ""]
12034#[doc = "ID: 110"]
12035#[derive(Debug, Clone, PartialEq)]
12036#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12038#[cfg_attr(feature = "ts", derive(TS))]
12039#[cfg_attr(feature = "ts", ts(export))]
12040pub struct FILE_TRANSFER_PROTOCOL_DATA {
12041    #[doc = "Network ID (0 for broadcast)"]
12042    pub target_network: u8,
12043    #[doc = "System ID (0 for broadcast)"]
12044    pub target_system: u8,
12045    #[doc = "Component ID (0 for broadcast)"]
12046    pub target_component: u8,
12047    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
12048    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12049    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12050    pub payload: [u8; 251],
12051}
12052impl FILE_TRANSFER_PROTOCOL_DATA {
12053    pub const ENCODED_LEN: usize = 254usize;
12054    pub const DEFAULT: Self = Self {
12055        target_network: 0_u8,
12056        target_system: 0_u8,
12057        target_component: 0_u8,
12058        payload: [0_u8; 251usize],
12059    };
12060    #[cfg(feature = "arbitrary")]
12061    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12062        use arbitrary::{Arbitrary, Unstructured};
12063        let mut buf = [0u8; 1024];
12064        rng.fill_bytes(&mut buf);
12065        let mut unstructured = Unstructured::new(&buf);
12066        Self::arbitrary(&mut unstructured).unwrap_or_default()
12067    }
12068}
12069impl Default for FILE_TRANSFER_PROTOCOL_DATA {
12070    fn default() -> Self {
12071        Self::DEFAULT.clone()
12072    }
12073}
12074impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
12075    type Message = MavMessage;
12076    const ID: u32 = 110u32;
12077    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
12078    const EXTRA_CRC: u8 = 84u8;
12079    const ENCODED_LEN: usize = 254usize;
12080    fn deser(
12081        _version: MavlinkVersion,
12082        __input: &[u8],
12083    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12084        let avail_len = __input.len();
12085        let mut payload_buf = [0; Self::ENCODED_LEN];
12086        let mut buf = if avail_len < Self::ENCODED_LEN {
12087            payload_buf[0..avail_len].copy_from_slice(__input);
12088            Bytes::new(&payload_buf)
12089        } else {
12090            Bytes::new(__input)
12091        };
12092        let mut __struct = Self::default();
12093        __struct.target_network = buf.get_u8();
12094        __struct.target_system = buf.get_u8();
12095        __struct.target_component = buf.get_u8();
12096        for v in &mut __struct.payload {
12097            let val = buf.get_u8();
12098            *v = val;
12099        }
12100        Ok(__struct)
12101    }
12102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12103        let mut __tmp = BytesMut::new(bytes);
12104        #[allow(clippy::absurd_extreme_comparisons)]
12105        #[allow(unused_comparisons)]
12106        if __tmp.remaining() < Self::ENCODED_LEN {
12107            panic!(
12108                "buffer is too small (need {} bytes, but got {})",
12109                Self::ENCODED_LEN,
12110                __tmp.remaining(),
12111            )
12112        }
12113        __tmp.put_u8(self.target_network);
12114        __tmp.put_u8(self.target_system);
12115        __tmp.put_u8(self.target_component);
12116        for val in &self.payload {
12117            __tmp.put_u8(*val);
12118        }
12119        if matches!(version, MavlinkVersion::V2) {
12120            let len = __tmp.len();
12121            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12122        } else {
12123            __tmp.len()
12124        }
12125    }
12126}
12127#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12128#[doc = ""]
12129#[doc = "ID: 264"]
12130#[derive(Debug, Clone, PartialEq)]
12131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12133#[cfg_attr(feature = "ts", derive(TS))]
12134#[cfg_attr(feature = "ts", ts(export))]
12135pub struct FLIGHT_INFORMATION_DATA {
12136    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12137    pub arming_time_utc: u64,
12138    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12139    pub takeoff_time_utc: u64,
12140    #[doc = "Flight number. Note, field is misnamed UUID."]
12141    pub flight_uuid: u64,
12142    #[doc = "Timestamp (time since system boot)."]
12143    pub time_boot_ms: u32,
12144    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12145    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12146    pub landing_time: u32,
12147}
12148impl FLIGHT_INFORMATION_DATA {
12149    pub const ENCODED_LEN: usize = 32usize;
12150    pub const DEFAULT: Self = Self {
12151        arming_time_utc: 0_u64,
12152        takeoff_time_utc: 0_u64,
12153        flight_uuid: 0_u64,
12154        time_boot_ms: 0_u32,
12155        landing_time: 0_u32,
12156    };
12157    #[cfg(feature = "arbitrary")]
12158    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12159        use arbitrary::{Arbitrary, Unstructured};
12160        let mut buf = [0u8; 1024];
12161        rng.fill_bytes(&mut buf);
12162        let mut unstructured = Unstructured::new(&buf);
12163        Self::arbitrary(&mut unstructured).unwrap_or_default()
12164    }
12165}
12166impl Default for FLIGHT_INFORMATION_DATA {
12167    fn default() -> Self {
12168        Self::DEFAULT.clone()
12169    }
12170}
12171impl MessageData for FLIGHT_INFORMATION_DATA {
12172    type Message = MavMessage;
12173    const ID: u32 = 264u32;
12174    const NAME: &'static str = "FLIGHT_INFORMATION";
12175    const EXTRA_CRC: u8 = 49u8;
12176    const ENCODED_LEN: usize = 32usize;
12177    fn deser(
12178        _version: MavlinkVersion,
12179        __input: &[u8],
12180    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12181        let avail_len = __input.len();
12182        let mut payload_buf = [0; Self::ENCODED_LEN];
12183        let mut buf = if avail_len < Self::ENCODED_LEN {
12184            payload_buf[0..avail_len].copy_from_slice(__input);
12185            Bytes::new(&payload_buf)
12186        } else {
12187            Bytes::new(__input)
12188        };
12189        let mut __struct = Self::default();
12190        __struct.arming_time_utc = buf.get_u64_le();
12191        __struct.takeoff_time_utc = buf.get_u64_le();
12192        __struct.flight_uuid = buf.get_u64_le();
12193        __struct.time_boot_ms = buf.get_u32_le();
12194        __struct.landing_time = buf.get_u32_le();
12195        Ok(__struct)
12196    }
12197    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12198        let mut __tmp = BytesMut::new(bytes);
12199        #[allow(clippy::absurd_extreme_comparisons)]
12200        #[allow(unused_comparisons)]
12201        if __tmp.remaining() < Self::ENCODED_LEN {
12202            panic!(
12203                "buffer is too small (need {} bytes, but got {})",
12204                Self::ENCODED_LEN,
12205                __tmp.remaining(),
12206            )
12207        }
12208        __tmp.put_u64_le(self.arming_time_utc);
12209        __tmp.put_u64_le(self.takeoff_time_utc);
12210        __tmp.put_u64_le(self.flight_uuid);
12211        __tmp.put_u32_le(self.time_boot_ms);
12212        if matches!(version, MavlinkVersion::V2) {
12213            __tmp.put_u32_le(self.landing_time);
12214            let len = __tmp.len();
12215            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12216        } else {
12217            __tmp.len()
12218        }
12219    }
12220}
12221#[doc = "Current motion information from a designated system."]
12222#[doc = ""]
12223#[doc = "ID: 144"]
12224#[derive(Debug, Clone, PartialEq)]
12225#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12226#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12227#[cfg_attr(feature = "ts", derive(TS))]
12228#[cfg_attr(feature = "ts", ts(export))]
12229pub struct FOLLOW_TARGET_DATA {
12230    #[doc = "Timestamp (time since system boot)."]
12231    pub timestamp: u64,
12232    #[doc = "button states or switches of a tracker device"]
12233    pub custom_state: u64,
12234    #[doc = "Latitude (WGS84)"]
12235    pub lat: i32,
12236    #[doc = "Longitude (WGS84)"]
12237    pub lon: i32,
12238    #[doc = "Altitude (MSL)"]
12239    pub alt: f32,
12240    #[doc = "target velocity (0,0,0) for unknown"]
12241    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12242    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12243    pub vel: [f32; 3],
12244    #[doc = "linear target acceleration (0,0,0) for unknown"]
12245    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12246    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12247    pub acc: [f32; 3],
12248    #[doc = "(0 0 0 0 for unknown)"]
12249    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12250    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12251    pub attitude_q: [f32; 4],
12252    #[doc = "(0 0 0 for unknown)"]
12253    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12254    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12255    pub rates: [f32; 3],
12256    #[doc = "eph epv"]
12257    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12258    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12259    pub position_cov: [f32; 3],
12260    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12261    pub est_capabilities: u8,
12262}
12263impl FOLLOW_TARGET_DATA {
12264    pub const ENCODED_LEN: usize = 93usize;
12265    pub const DEFAULT: Self = Self {
12266        timestamp: 0_u64,
12267        custom_state: 0_u64,
12268        lat: 0_i32,
12269        lon: 0_i32,
12270        alt: 0.0_f32,
12271        vel: [0.0_f32; 3usize],
12272        acc: [0.0_f32; 3usize],
12273        attitude_q: [0.0_f32; 4usize],
12274        rates: [0.0_f32; 3usize],
12275        position_cov: [0.0_f32; 3usize],
12276        est_capabilities: 0_u8,
12277    };
12278    #[cfg(feature = "arbitrary")]
12279    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12280        use arbitrary::{Arbitrary, Unstructured};
12281        let mut buf = [0u8; 1024];
12282        rng.fill_bytes(&mut buf);
12283        let mut unstructured = Unstructured::new(&buf);
12284        Self::arbitrary(&mut unstructured).unwrap_or_default()
12285    }
12286}
12287impl Default for FOLLOW_TARGET_DATA {
12288    fn default() -> Self {
12289        Self::DEFAULT.clone()
12290    }
12291}
12292impl MessageData for FOLLOW_TARGET_DATA {
12293    type Message = MavMessage;
12294    const ID: u32 = 144u32;
12295    const NAME: &'static str = "FOLLOW_TARGET";
12296    const EXTRA_CRC: u8 = 127u8;
12297    const ENCODED_LEN: usize = 93usize;
12298    fn deser(
12299        _version: MavlinkVersion,
12300        __input: &[u8],
12301    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12302        let avail_len = __input.len();
12303        let mut payload_buf = [0; Self::ENCODED_LEN];
12304        let mut buf = if avail_len < Self::ENCODED_LEN {
12305            payload_buf[0..avail_len].copy_from_slice(__input);
12306            Bytes::new(&payload_buf)
12307        } else {
12308            Bytes::new(__input)
12309        };
12310        let mut __struct = Self::default();
12311        __struct.timestamp = buf.get_u64_le();
12312        __struct.custom_state = buf.get_u64_le();
12313        __struct.lat = buf.get_i32_le();
12314        __struct.lon = buf.get_i32_le();
12315        __struct.alt = buf.get_f32_le();
12316        for v in &mut __struct.vel {
12317            let val = buf.get_f32_le();
12318            *v = val;
12319        }
12320        for v in &mut __struct.acc {
12321            let val = buf.get_f32_le();
12322            *v = val;
12323        }
12324        for v in &mut __struct.attitude_q {
12325            let val = buf.get_f32_le();
12326            *v = val;
12327        }
12328        for v in &mut __struct.rates {
12329            let val = buf.get_f32_le();
12330            *v = val;
12331        }
12332        for v in &mut __struct.position_cov {
12333            let val = buf.get_f32_le();
12334            *v = val;
12335        }
12336        __struct.est_capabilities = buf.get_u8();
12337        Ok(__struct)
12338    }
12339    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12340        let mut __tmp = BytesMut::new(bytes);
12341        #[allow(clippy::absurd_extreme_comparisons)]
12342        #[allow(unused_comparisons)]
12343        if __tmp.remaining() < Self::ENCODED_LEN {
12344            panic!(
12345                "buffer is too small (need {} bytes, but got {})",
12346                Self::ENCODED_LEN,
12347                __tmp.remaining(),
12348            )
12349        }
12350        __tmp.put_u64_le(self.timestamp);
12351        __tmp.put_u64_le(self.custom_state);
12352        __tmp.put_i32_le(self.lat);
12353        __tmp.put_i32_le(self.lon);
12354        __tmp.put_f32_le(self.alt);
12355        for val in &self.vel {
12356            __tmp.put_f32_le(*val);
12357        }
12358        for val in &self.acc {
12359            __tmp.put_f32_le(*val);
12360        }
12361        for val in &self.attitude_q {
12362            __tmp.put_f32_le(*val);
12363        }
12364        for val in &self.rates {
12365            __tmp.put_f32_le(*val);
12366        }
12367        for val in &self.position_cov {
12368            __tmp.put_f32_le(*val);
12369        }
12370        __tmp.put_u8(self.est_capabilities);
12371        if matches!(version, MavlinkVersion::V2) {
12372            let len = __tmp.len();
12373            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12374        } else {
12375            __tmp.len()
12376        }
12377    }
12378}
12379#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12380#[doc = ""]
12381#[doc = "ID: 371"]
12382#[derive(Debug, Clone, PartialEq)]
12383#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12385#[cfg_attr(feature = "ts", derive(TS))]
12386#[cfg_attr(feature = "ts", ts(export))]
12387pub struct FUEL_STATUS_DATA {
12388    #[doc = "Capacity when full. Must be provided."]
12389    pub maximum_fuel: f32,
12390    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12391    pub consumed_fuel: f32,
12392    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12393    pub remaining_fuel: f32,
12394    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12395    pub flow_rate: f32,
12396    #[doc = "Fuel temperature. NaN: field not provided."]
12397    pub temperature: f32,
12398    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12399    pub fuel_type: MavFuelType,
12400    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12401    pub id: u8,
12402    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12403    pub percent_remaining: u8,
12404}
12405impl FUEL_STATUS_DATA {
12406    pub const ENCODED_LEN: usize = 26usize;
12407    pub const DEFAULT: Self = Self {
12408        maximum_fuel: 0.0_f32,
12409        consumed_fuel: 0.0_f32,
12410        remaining_fuel: 0.0_f32,
12411        flow_rate: 0.0_f32,
12412        temperature: 0.0_f32,
12413        fuel_type: MavFuelType::DEFAULT,
12414        id: 0_u8,
12415        percent_remaining: 0_u8,
12416    };
12417    #[cfg(feature = "arbitrary")]
12418    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12419        use arbitrary::{Arbitrary, Unstructured};
12420        let mut buf = [0u8; 1024];
12421        rng.fill_bytes(&mut buf);
12422        let mut unstructured = Unstructured::new(&buf);
12423        Self::arbitrary(&mut unstructured).unwrap_or_default()
12424    }
12425}
12426impl Default for FUEL_STATUS_DATA {
12427    fn default() -> Self {
12428        Self::DEFAULT.clone()
12429    }
12430}
12431impl MessageData for FUEL_STATUS_DATA {
12432    type Message = MavMessage;
12433    const ID: u32 = 371u32;
12434    const NAME: &'static str = "FUEL_STATUS";
12435    const EXTRA_CRC: u8 = 10u8;
12436    const ENCODED_LEN: usize = 26usize;
12437    fn deser(
12438        _version: MavlinkVersion,
12439        __input: &[u8],
12440    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12441        let avail_len = __input.len();
12442        let mut payload_buf = [0; Self::ENCODED_LEN];
12443        let mut buf = if avail_len < Self::ENCODED_LEN {
12444            payload_buf[0..avail_len].copy_from_slice(__input);
12445            Bytes::new(&payload_buf)
12446        } else {
12447            Bytes::new(__input)
12448        };
12449        let mut __struct = Self::default();
12450        __struct.maximum_fuel = buf.get_f32_le();
12451        __struct.consumed_fuel = buf.get_f32_le();
12452        __struct.remaining_fuel = buf.get_f32_le();
12453        __struct.flow_rate = buf.get_f32_le();
12454        __struct.temperature = buf.get_f32_le();
12455        let tmp = buf.get_u32_le();
12456        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12457            ::mavlink_core::error::ParserError::InvalidEnum {
12458                enum_type: "MavFuelType",
12459                value: tmp as u32,
12460            },
12461        )?;
12462        __struct.id = buf.get_u8();
12463        __struct.percent_remaining = buf.get_u8();
12464        Ok(__struct)
12465    }
12466    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12467        let mut __tmp = BytesMut::new(bytes);
12468        #[allow(clippy::absurd_extreme_comparisons)]
12469        #[allow(unused_comparisons)]
12470        if __tmp.remaining() < Self::ENCODED_LEN {
12471            panic!(
12472                "buffer is too small (need {} bytes, but got {})",
12473                Self::ENCODED_LEN,
12474                __tmp.remaining(),
12475            )
12476        }
12477        __tmp.put_f32_le(self.maximum_fuel);
12478        __tmp.put_f32_le(self.consumed_fuel);
12479        __tmp.put_f32_le(self.remaining_fuel);
12480        __tmp.put_f32_le(self.flow_rate);
12481        __tmp.put_f32_le(self.temperature);
12482        __tmp.put_u32_le(self.fuel_type as u32);
12483        __tmp.put_u8(self.id);
12484        __tmp.put_u8(self.percent_remaining);
12485        if matches!(version, MavlinkVersion::V2) {
12486            let len = __tmp.len();
12487            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12488        } else {
12489            __tmp.len()
12490        }
12491    }
12492}
12493#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12494#[doc = ""]
12495#[doc = "ID: 373"]
12496#[derive(Debug, Clone, PartialEq)]
12497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12499#[cfg_attr(feature = "ts", derive(TS))]
12500#[cfg_attr(feature = "ts", ts(export))]
12501pub struct GENERATOR_STATUS_DATA {
12502    #[doc = "Status flags."]
12503    pub status: MavGeneratorStatusFlag,
12504    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12505    pub battery_current: f32,
12506    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12507    pub load_current: f32,
12508    #[doc = "The power being generated. NaN: field not provided"]
12509    pub power_generated: f32,
12510    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12511    pub bus_voltage: f32,
12512    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12513    pub bat_current_setpoint: f32,
12514    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12515    pub runtime: u32,
12516    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12517    pub time_until_maintenance: i32,
12518    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12519    pub generator_speed: u16,
12520    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12521    pub rectifier_temperature: i16,
12522    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12523    pub generator_temperature: i16,
12524}
12525impl GENERATOR_STATUS_DATA {
12526    pub const ENCODED_LEN: usize = 42usize;
12527    pub const DEFAULT: Self = Self {
12528        status: MavGeneratorStatusFlag::DEFAULT,
12529        battery_current: 0.0_f32,
12530        load_current: 0.0_f32,
12531        power_generated: 0.0_f32,
12532        bus_voltage: 0.0_f32,
12533        bat_current_setpoint: 0.0_f32,
12534        runtime: 0_u32,
12535        time_until_maintenance: 0_i32,
12536        generator_speed: 0_u16,
12537        rectifier_temperature: 0_i16,
12538        generator_temperature: 0_i16,
12539    };
12540    #[cfg(feature = "arbitrary")]
12541    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12542        use arbitrary::{Arbitrary, Unstructured};
12543        let mut buf = [0u8; 1024];
12544        rng.fill_bytes(&mut buf);
12545        let mut unstructured = Unstructured::new(&buf);
12546        Self::arbitrary(&mut unstructured).unwrap_or_default()
12547    }
12548}
12549impl Default for GENERATOR_STATUS_DATA {
12550    fn default() -> Self {
12551        Self::DEFAULT.clone()
12552    }
12553}
12554impl MessageData for GENERATOR_STATUS_DATA {
12555    type Message = MavMessage;
12556    const ID: u32 = 373u32;
12557    const NAME: &'static str = "GENERATOR_STATUS";
12558    const EXTRA_CRC: u8 = 117u8;
12559    const ENCODED_LEN: usize = 42usize;
12560    fn deser(
12561        _version: MavlinkVersion,
12562        __input: &[u8],
12563    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12564        let avail_len = __input.len();
12565        let mut payload_buf = [0; Self::ENCODED_LEN];
12566        let mut buf = if avail_len < Self::ENCODED_LEN {
12567            payload_buf[0..avail_len].copy_from_slice(__input);
12568            Bytes::new(&payload_buf)
12569        } else {
12570            Bytes::new(__input)
12571        };
12572        let mut __struct = Self::default();
12573        let tmp = buf.get_u64_le();
12574        __struct.status = MavGeneratorStatusFlag::from_bits(
12575            tmp & MavGeneratorStatusFlag::all().bits(),
12576        )
12577        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12578            flag_type: "MavGeneratorStatusFlag",
12579            value: tmp as u32,
12580        })?;
12581        __struct.battery_current = buf.get_f32_le();
12582        __struct.load_current = buf.get_f32_le();
12583        __struct.power_generated = buf.get_f32_le();
12584        __struct.bus_voltage = buf.get_f32_le();
12585        __struct.bat_current_setpoint = buf.get_f32_le();
12586        __struct.runtime = buf.get_u32_le();
12587        __struct.time_until_maintenance = buf.get_i32_le();
12588        __struct.generator_speed = buf.get_u16_le();
12589        __struct.rectifier_temperature = buf.get_i16_le();
12590        __struct.generator_temperature = buf.get_i16_le();
12591        Ok(__struct)
12592    }
12593    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12594        let mut __tmp = BytesMut::new(bytes);
12595        #[allow(clippy::absurd_extreme_comparisons)]
12596        #[allow(unused_comparisons)]
12597        if __tmp.remaining() < Self::ENCODED_LEN {
12598            panic!(
12599                "buffer is too small (need {} bytes, but got {})",
12600                Self::ENCODED_LEN,
12601                __tmp.remaining(),
12602            )
12603        }
12604        __tmp.put_u64_le(self.status.bits());
12605        __tmp.put_f32_le(self.battery_current);
12606        __tmp.put_f32_le(self.load_current);
12607        __tmp.put_f32_le(self.power_generated);
12608        __tmp.put_f32_le(self.bus_voltage);
12609        __tmp.put_f32_le(self.bat_current_setpoint);
12610        __tmp.put_u32_le(self.runtime);
12611        __tmp.put_i32_le(self.time_until_maintenance);
12612        __tmp.put_u16_le(self.generator_speed);
12613        __tmp.put_i16_le(self.rectifier_temperature);
12614        __tmp.put_i16_le(self.generator_temperature);
12615        if matches!(version, MavlinkVersion::V2) {
12616            let len = __tmp.len();
12617            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12618        } else {
12619            __tmp.len()
12620        }
12621    }
12622}
12623#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12624#[doc = ""]
12625#[doc = "ID: 285"]
12626#[derive(Debug, Clone, PartialEq)]
12627#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12628#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12629#[cfg_attr(feature = "ts", derive(TS))]
12630#[cfg_attr(feature = "ts", ts(export))]
12631pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12632    #[doc = "Timestamp (time since system boot)."]
12633    pub time_boot_ms: u32,
12634    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12635    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12636    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12637    pub q: [f32; 4],
12638    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12639    pub angular_velocity_x: f32,
12640    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12641    pub angular_velocity_y: f32,
12642    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12643    pub angular_velocity_z: f32,
12644    #[doc = "Failure flags (0 for no failure)"]
12645    pub failure_flags: GimbalDeviceErrorFlags,
12646    #[doc = "Current gimbal flags set."]
12647    pub flags: GimbalDeviceFlags,
12648    #[doc = "System ID"]
12649    pub target_system: u8,
12650    #[doc = "Component ID"]
12651    pub target_component: u8,
12652    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12653    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12654    pub delta_yaw: f32,
12655    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12656    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12657    pub delta_yaw_velocity: f32,
12658    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12659    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12660    pub gimbal_device_id: u8,
12661}
12662impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12663    pub const ENCODED_LEN: usize = 49usize;
12664    pub const DEFAULT: Self = Self {
12665        time_boot_ms: 0_u32,
12666        q: [0.0_f32; 4usize],
12667        angular_velocity_x: 0.0_f32,
12668        angular_velocity_y: 0.0_f32,
12669        angular_velocity_z: 0.0_f32,
12670        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12671        flags: GimbalDeviceFlags::DEFAULT,
12672        target_system: 0_u8,
12673        target_component: 0_u8,
12674        delta_yaw: 0.0_f32,
12675        delta_yaw_velocity: 0.0_f32,
12676        gimbal_device_id: 0_u8,
12677    };
12678    #[cfg(feature = "arbitrary")]
12679    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12680        use arbitrary::{Arbitrary, Unstructured};
12681        let mut buf = [0u8; 1024];
12682        rng.fill_bytes(&mut buf);
12683        let mut unstructured = Unstructured::new(&buf);
12684        Self::arbitrary(&mut unstructured).unwrap_or_default()
12685    }
12686}
12687impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12688    fn default() -> Self {
12689        Self::DEFAULT.clone()
12690    }
12691}
12692impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12693    type Message = MavMessage;
12694    const ID: u32 = 285u32;
12695    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12696    const EXTRA_CRC: u8 = 137u8;
12697    const ENCODED_LEN: usize = 49usize;
12698    fn deser(
12699        _version: MavlinkVersion,
12700        __input: &[u8],
12701    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12702        let avail_len = __input.len();
12703        let mut payload_buf = [0; Self::ENCODED_LEN];
12704        let mut buf = if avail_len < Self::ENCODED_LEN {
12705            payload_buf[0..avail_len].copy_from_slice(__input);
12706            Bytes::new(&payload_buf)
12707        } else {
12708            Bytes::new(__input)
12709        };
12710        let mut __struct = Self::default();
12711        __struct.time_boot_ms = buf.get_u32_le();
12712        for v in &mut __struct.q {
12713            let val = buf.get_f32_le();
12714            *v = val;
12715        }
12716        __struct.angular_velocity_x = buf.get_f32_le();
12717        __struct.angular_velocity_y = buf.get_f32_le();
12718        __struct.angular_velocity_z = buf.get_f32_le();
12719        let tmp = buf.get_u32_le();
12720        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
12721            tmp & GimbalDeviceErrorFlags::all().bits(),
12722        )
12723        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12724            flag_type: "GimbalDeviceErrorFlags",
12725            value: tmp as u32,
12726        })?;
12727        let tmp = buf.get_u16_le();
12728        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12729            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12730                flag_type: "GimbalDeviceFlags",
12731                value: tmp as u32,
12732            })?;
12733        __struct.target_system = buf.get_u8();
12734        __struct.target_component = buf.get_u8();
12735        __struct.delta_yaw = buf.get_f32_le();
12736        __struct.delta_yaw_velocity = buf.get_f32_le();
12737        __struct.gimbal_device_id = buf.get_u8();
12738        Ok(__struct)
12739    }
12740    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12741        let mut __tmp = BytesMut::new(bytes);
12742        #[allow(clippy::absurd_extreme_comparisons)]
12743        #[allow(unused_comparisons)]
12744        if __tmp.remaining() < Self::ENCODED_LEN {
12745            panic!(
12746                "buffer is too small (need {} bytes, but got {})",
12747                Self::ENCODED_LEN,
12748                __tmp.remaining(),
12749            )
12750        }
12751        __tmp.put_u32_le(self.time_boot_ms);
12752        for val in &self.q {
12753            __tmp.put_f32_le(*val);
12754        }
12755        __tmp.put_f32_le(self.angular_velocity_x);
12756        __tmp.put_f32_le(self.angular_velocity_y);
12757        __tmp.put_f32_le(self.angular_velocity_z);
12758        __tmp.put_u32_le(self.failure_flags.bits());
12759        __tmp.put_u16_le(self.flags.bits());
12760        __tmp.put_u8(self.target_system);
12761        __tmp.put_u8(self.target_component);
12762        if matches!(version, MavlinkVersion::V2) {
12763            __tmp.put_f32_le(self.delta_yaw);
12764            __tmp.put_f32_le(self.delta_yaw_velocity);
12765            __tmp.put_u8(self.gimbal_device_id);
12766            let len = __tmp.len();
12767            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12768        } else {
12769            __tmp.len()
12770        }
12771    }
12772}
12773#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12774#[doc = ""]
12775#[doc = "ID: 283"]
12776#[derive(Debug, Clone, PartialEq)]
12777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12778#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12779#[cfg_attr(feature = "ts", derive(TS))]
12780#[cfg_attr(feature = "ts", ts(export))]
12781pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12782    #[doc = "UID of gimbal hardware (0 if unknown)."]
12783    pub uid: u64,
12784    #[doc = "Timestamp (time since system boot)."]
12785    pub time_boot_ms: u32,
12786    #[doc = "0xff)."]
12787    pub firmware_version: u32,
12788    #[doc = "0xff)."]
12789    pub hardware_version: u32,
12790    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12791    pub roll_min: f32,
12792    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12793    pub roll_max: f32,
12794    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12795    pub pitch_min: f32,
12796    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12797    pub pitch_max: f32,
12798    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12799    pub yaw_min: f32,
12800    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12801    pub yaw_max: f32,
12802    #[doc = "Bitmap of gimbal capability flags."]
12803    pub cap_flags: GimbalDeviceCapFlags,
12804    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12805    pub custom_cap_flags: u16,
12806    #[doc = "Name of the gimbal vendor."]
12807    #[cfg_attr(
12808        feature = "serde",
12809        serde(
12810            serialize_with = "crate::nulstr::serialize::<_, 32>",
12811            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
12812        )
12813    )]
12814    #[cfg_attr(feature = "ts", ts(type = "string"))]
12815    pub vendor_name: [u8; 32],
12816    #[doc = "Name of the gimbal model."]
12817    #[cfg_attr(
12818        feature = "serde",
12819        serde(
12820            serialize_with = "crate::nulstr::serialize::<_, 32>",
12821            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
12822        )
12823    )]
12824    #[cfg_attr(feature = "ts", ts(type = "string"))]
12825    pub model_name: [u8; 32],
12826    #[doc = "Custom name of the gimbal given to it by the user."]
12827    #[cfg_attr(
12828        feature = "serde",
12829        serde(
12830            serialize_with = "crate::nulstr::serialize::<_, 32>",
12831            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
12832        )
12833    )]
12834    #[cfg_attr(feature = "ts", ts(type = "string"))]
12835    pub custom_name: [u8; 32],
12836    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12837    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12838    pub gimbal_device_id: u8,
12839}
12840impl GIMBAL_DEVICE_INFORMATION_DATA {
12841    pub const ENCODED_LEN: usize = 145usize;
12842    pub const DEFAULT: Self = Self {
12843        uid: 0_u64,
12844        time_boot_ms: 0_u32,
12845        firmware_version: 0_u32,
12846        hardware_version: 0_u32,
12847        roll_min: 0.0_f32,
12848        roll_max: 0.0_f32,
12849        pitch_min: 0.0_f32,
12850        pitch_max: 0.0_f32,
12851        yaw_min: 0.0_f32,
12852        yaw_max: 0.0_f32,
12853        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12854        custom_cap_flags: 0_u16,
12855        vendor_name: [0_u8; 32usize],
12856        model_name: [0_u8; 32usize],
12857        custom_name: [0_u8; 32usize],
12858        gimbal_device_id: 0_u8,
12859    };
12860    #[cfg(feature = "arbitrary")]
12861    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12862        use arbitrary::{Arbitrary, Unstructured};
12863        let mut buf = [0u8; 1024];
12864        rng.fill_bytes(&mut buf);
12865        let mut unstructured = Unstructured::new(&buf);
12866        Self::arbitrary(&mut unstructured).unwrap_or_default()
12867    }
12868}
12869impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12870    fn default() -> Self {
12871        Self::DEFAULT.clone()
12872    }
12873}
12874impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12875    type Message = MavMessage;
12876    const ID: u32 = 283u32;
12877    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12878    const EXTRA_CRC: u8 = 74u8;
12879    const ENCODED_LEN: usize = 145usize;
12880    fn deser(
12881        _version: MavlinkVersion,
12882        __input: &[u8],
12883    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12884        let avail_len = __input.len();
12885        let mut payload_buf = [0; Self::ENCODED_LEN];
12886        let mut buf = if avail_len < Self::ENCODED_LEN {
12887            payload_buf[0..avail_len].copy_from_slice(__input);
12888            Bytes::new(&payload_buf)
12889        } else {
12890            Bytes::new(__input)
12891        };
12892        let mut __struct = Self::default();
12893        __struct.uid = buf.get_u64_le();
12894        __struct.time_boot_ms = buf.get_u32_le();
12895        __struct.firmware_version = buf.get_u32_le();
12896        __struct.hardware_version = buf.get_u32_le();
12897        __struct.roll_min = buf.get_f32_le();
12898        __struct.roll_max = buf.get_f32_le();
12899        __struct.pitch_min = buf.get_f32_le();
12900        __struct.pitch_max = buf.get_f32_le();
12901        __struct.yaw_min = buf.get_f32_le();
12902        __struct.yaw_max = buf.get_f32_le();
12903        let tmp = buf.get_u16_le();
12904        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12905            tmp & GimbalDeviceCapFlags::all().bits(),
12906        )
12907        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12908            flag_type: "GimbalDeviceCapFlags",
12909            value: tmp as u32,
12910        })?;
12911        __struct.custom_cap_flags = buf.get_u16_le();
12912        for v in &mut __struct.vendor_name {
12913            let val = buf.get_u8();
12914            *v = val;
12915        }
12916        for v in &mut __struct.model_name {
12917            let val = buf.get_u8();
12918            *v = val;
12919        }
12920        for v in &mut __struct.custom_name {
12921            let val = buf.get_u8();
12922            *v = val;
12923        }
12924        __struct.gimbal_device_id = buf.get_u8();
12925        Ok(__struct)
12926    }
12927    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12928        let mut __tmp = BytesMut::new(bytes);
12929        #[allow(clippy::absurd_extreme_comparisons)]
12930        #[allow(unused_comparisons)]
12931        if __tmp.remaining() < Self::ENCODED_LEN {
12932            panic!(
12933                "buffer is too small (need {} bytes, but got {})",
12934                Self::ENCODED_LEN,
12935                __tmp.remaining(),
12936            )
12937        }
12938        __tmp.put_u64_le(self.uid);
12939        __tmp.put_u32_le(self.time_boot_ms);
12940        __tmp.put_u32_le(self.firmware_version);
12941        __tmp.put_u32_le(self.hardware_version);
12942        __tmp.put_f32_le(self.roll_min);
12943        __tmp.put_f32_le(self.roll_max);
12944        __tmp.put_f32_le(self.pitch_min);
12945        __tmp.put_f32_le(self.pitch_max);
12946        __tmp.put_f32_le(self.yaw_min);
12947        __tmp.put_f32_le(self.yaw_max);
12948        __tmp.put_u16_le(self.cap_flags.bits());
12949        __tmp.put_u16_le(self.custom_cap_flags);
12950        for val in &self.vendor_name {
12951            __tmp.put_u8(*val);
12952        }
12953        for val in &self.model_name {
12954            __tmp.put_u8(*val);
12955        }
12956        for val in &self.custom_name {
12957            __tmp.put_u8(*val);
12958        }
12959        if matches!(version, MavlinkVersion::V2) {
12960            __tmp.put_u8(self.gimbal_device_id);
12961            let len = __tmp.len();
12962            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12963        } else {
12964            __tmp.len()
12965        }
12966    }
12967}
12968#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12969#[doc = ""]
12970#[doc = "ID: 284"]
12971#[derive(Debug, Clone, PartialEq)]
12972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12974#[cfg_attr(feature = "ts", derive(TS))]
12975#[cfg_attr(feature = "ts", ts(export))]
12976pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12977    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12978    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12979    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12980    pub q: [f32; 4],
12981    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12982    pub angular_velocity_x: f32,
12983    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12984    pub angular_velocity_y: f32,
12985    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12986    pub angular_velocity_z: f32,
12987    #[doc = "Low level gimbal flags."]
12988    pub flags: GimbalDeviceFlags,
12989    #[doc = "System ID"]
12990    pub target_system: u8,
12991    #[doc = "Component ID"]
12992    pub target_component: u8,
12993}
12994impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12995    pub const ENCODED_LEN: usize = 32usize;
12996    pub const DEFAULT: Self = Self {
12997        q: [0.0_f32; 4usize],
12998        angular_velocity_x: 0.0_f32,
12999        angular_velocity_y: 0.0_f32,
13000        angular_velocity_z: 0.0_f32,
13001        flags: GimbalDeviceFlags::DEFAULT,
13002        target_system: 0_u8,
13003        target_component: 0_u8,
13004    };
13005    #[cfg(feature = "arbitrary")]
13006    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13007        use arbitrary::{Arbitrary, Unstructured};
13008        let mut buf = [0u8; 1024];
13009        rng.fill_bytes(&mut buf);
13010        let mut unstructured = Unstructured::new(&buf);
13011        Self::arbitrary(&mut unstructured).unwrap_or_default()
13012    }
13013}
13014impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13015    fn default() -> Self {
13016        Self::DEFAULT.clone()
13017    }
13018}
13019impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13020    type Message = MavMessage;
13021    const ID: u32 = 284u32;
13022    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13023    const EXTRA_CRC: u8 = 99u8;
13024    const ENCODED_LEN: usize = 32usize;
13025    fn deser(
13026        _version: MavlinkVersion,
13027        __input: &[u8],
13028    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13029        let avail_len = __input.len();
13030        let mut payload_buf = [0; Self::ENCODED_LEN];
13031        let mut buf = if avail_len < Self::ENCODED_LEN {
13032            payload_buf[0..avail_len].copy_from_slice(__input);
13033            Bytes::new(&payload_buf)
13034        } else {
13035            Bytes::new(__input)
13036        };
13037        let mut __struct = Self::default();
13038        for v in &mut __struct.q {
13039            let val = buf.get_f32_le();
13040            *v = val;
13041        }
13042        __struct.angular_velocity_x = buf.get_f32_le();
13043        __struct.angular_velocity_y = buf.get_f32_le();
13044        __struct.angular_velocity_z = buf.get_f32_le();
13045        let tmp = buf.get_u16_le();
13046        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
13047            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13048                flag_type: "GimbalDeviceFlags",
13049                value: tmp as u32,
13050            })?;
13051        __struct.target_system = buf.get_u8();
13052        __struct.target_component = buf.get_u8();
13053        Ok(__struct)
13054    }
13055    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13056        let mut __tmp = BytesMut::new(bytes);
13057        #[allow(clippy::absurd_extreme_comparisons)]
13058        #[allow(unused_comparisons)]
13059        if __tmp.remaining() < Self::ENCODED_LEN {
13060            panic!(
13061                "buffer is too small (need {} bytes, but got {})",
13062                Self::ENCODED_LEN,
13063                __tmp.remaining(),
13064            )
13065        }
13066        for val in &self.q {
13067            __tmp.put_f32_le(*val);
13068        }
13069        __tmp.put_f32_le(self.angular_velocity_x);
13070        __tmp.put_f32_le(self.angular_velocity_y);
13071        __tmp.put_f32_le(self.angular_velocity_z);
13072        __tmp.put_u16_le(self.flags.bits());
13073        __tmp.put_u8(self.target_system);
13074        __tmp.put_u8(self.target_component);
13075        if matches!(version, MavlinkVersion::V2) {
13076            let len = __tmp.len();
13077            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13078        } else {
13079            __tmp.len()
13080        }
13081    }
13082}
13083#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13084#[doc = ""]
13085#[doc = "ID: 280"]
13086#[derive(Debug, Clone, PartialEq)]
13087#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13089#[cfg_attr(feature = "ts", derive(TS))]
13090#[cfg_attr(feature = "ts", ts(export))]
13091pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13092    #[doc = "Timestamp (time since system boot)."]
13093    pub time_boot_ms: u32,
13094    #[doc = "Bitmap of gimbal capability flags."]
13095    pub cap_flags: GimbalManagerCapFlags,
13096    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13097    pub roll_min: f32,
13098    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13099    pub roll_max: f32,
13100    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13101    pub pitch_min: f32,
13102    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13103    pub pitch_max: f32,
13104    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13105    pub yaw_min: f32,
13106    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13107    pub yaw_max: f32,
13108    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13109    pub gimbal_device_id: u8,
13110}
13111impl GIMBAL_MANAGER_INFORMATION_DATA {
13112    pub const ENCODED_LEN: usize = 33usize;
13113    pub const DEFAULT: Self = Self {
13114        time_boot_ms: 0_u32,
13115        cap_flags: GimbalManagerCapFlags::DEFAULT,
13116        roll_min: 0.0_f32,
13117        roll_max: 0.0_f32,
13118        pitch_min: 0.0_f32,
13119        pitch_max: 0.0_f32,
13120        yaw_min: 0.0_f32,
13121        yaw_max: 0.0_f32,
13122        gimbal_device_id: 0_u8,
13123    };
13124    #[cfg(feature = "arbitrary")]
13125    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13126        use arbitrary::{Arbitrary, Unstructured};
13127        let mut buf = [0u8; 1024];
13128        rng.fill_bytes(&mut buf);
13129        let mut unstructured = Unstructured::new(&buf);
13130        Self::arbitrary(&mut unstructured).unwrap_or_default()
13131    }
13132}
13133impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13134    fn default() -> Self {
13135        Self::DEFAULT.clone()
13136    }
13137}
13138impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13139    type Message = MavMessage;
13140    const ID: u32 = 280u32;
13141    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13142    const EXTRA_CRC: u8 = 70u8;
13143    const ENCODED_LEN: usize = 33usize;
13144    fn deser(
13145        _version: MavlinkVersion,
13146        __input: &[u8],
13147    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13148        let avail_len = __input.len();
13149        let mut payload_buf = [0; Self::ENCODED_LEN];
13150        let mut buf = if avail_len < Self::ENCODED_LEN {
13151            payload_buf[0..avail_len].copy_from_slice(__input);
13152            Bytes::new(&payload_buf)
13153        } else {
13154            Bytes::new(__input)
13155        };
13156        let mut __struct = Self::default();
13157        __struct.time_boot_ms = buf.get_u32_le();
13158        let tmp = buf.get_u32_le();
13159        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13160            tmp & GimbalManagerCapFlags::all().bits(),
13161        )
13162        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13163            flag_type: "GimbalManagerCapFlags",
13164            value: tmp as u32,
13165        })?;
13166        __struct.roll_min = buf.get_f32_le();
13167        __struct.roll_max = buf.get_f32_le();
13168        __struct.pitch_min = buf.get_f32_le();
13169        __struct.pitch_max = buf.get_f32_le();
13170        __struct.yaw_min = buf.get_f32_le();
13171        __struct.yaw_max = buf.get_f32_le();
13172        __struct.gimbal_device_id = buf.get_u8();
13173        Ok(__struct)
13174    }
13175    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13176        let mut __tmp = BytesMut::new(bytes);
13177        #[allow(clippy::absurd_extreme_comparisons)]
13178        #[allow(unused_comparisons)]
13179        if __tmp.remaining() < Self::ENCODED_LEN {
13180            panic!(
13181                "buffer is too small (need {} bytes, but got {})",
13182                Self::ENCODED_LEN,
13183                __tmp.remaining(),
13184            )
13185        }
13186        __tmp.put_u32_le(self.time_boot_ms);
13187        __tmp.put_u32_le(self.cap_flags.bits());
13188        __tmp.put_f32_le(self.roll_min);
13189        __tmp.put_f32_le(self.roll_max);
13190        __tmp.put_f32_le(self.pitch_min);
13191        __tmp.put_f32_le(self.pitch_max);
13192        __tmp.put_f32_le(self.yaw_min);
13193        __tmp.put_f32_le(self.yaw_max);
13194        __tmp.put_u8(self.gimbal_device_id);
13195        if matches!(version, MavlinkVersion::V2) {
13196            let len = __tmp.len();
13197            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13198        } else {
13199            __tmp.len()
13200        }
13201    }
13202}
13203#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13204#[doc = ""]
13205#[doc = "ID: 282"]
13206#[derive(Debug, Clone, PartialEq)]
13207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13209#[cfg_attr(feature = "ts", derive(TS))]
13210#[cfg_attr(feature = "ts", ts(export))]
13211pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13212    #[doc = "High level gimbal manager flags to use."]
13213    pub flags: GimbalManagerFlags,
13214    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13215    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13216    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13217    pub q: [f32; 4],
13218    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13219    pub angular_velocity_x: f32,
13220    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13221    pub angular_velocity_y: f32,
13222    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13223    pub angular_velocity_z: f32,
13224    #[doc = "System ID"]
13225    pub target_system: u8,
13226    #[doc = "Component ID"]
13227    pub target_component: u8,
13228    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13229    pub gimbal_device_id: u8,
13230}
13231impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13232    pub const ENCODED_LEN: usize = 35usize;
13233    pub const DEFAULT: Self = Self {
13234        flags: GimbalManagerFlags::DEFAULT,
13235        q: [0.0_f32; 4usize],
13236        angular_velocity_x: 0.0_f32,
13237        angular_velocity_y: 0.0_f32,
13238        angular_velocity_z: 0.0_f32,
13239        target_system: 0_u8,
13240        target_component: 0_u8,
13241        gimbal_device_id: 0_u8,
13242    };
13243    #[cfg(feature = "arbitrary")]
13244    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13245        use arbitrary::{Arbitrary, Unstructured};
13246        let mut buf = [0u8; 1024];
13247        rng.fill_bytes(&mut buf);
13248        let mut unstructured = Unstructured::new(&buf);
13249        Self::arbitrary(&mut unstructured).unwrap_or_default()
13250    }
13251}
13252impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13253    fn default() -> Self {
13254        Self::DEFAULT.clone()
13255    }
13256}
13257impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13258    type Message = MavMessage;
13259    const ID: u32 = 282u32;
13260    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13261    const EXTRA_CRC: u8 = 123u8;
13262    const ENCODED_LEN: usize = 35usize;
13263    fn deser(
13264        _version: MavlinkVersion,
13265        __input: &[u8],
13266    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13267        let avail_len = __input.len();
13268        let mut payload_buf = [0; Self::ENCODED_LEN];
13269        let mut buf = if avail_len < Self::ENCODED_LEN {
13270            payload_buf[0..avail_len].copy_from_slice(__input);
13271            Bytes::new(&payload_buf)
13272        } else {
13273            Bytes::new(__input)
13274        };
13275        let mut __struct = Self::default();
13276        let tmp = buf.get_u32_le();
13277        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13278            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13279                flag_type: "GimbalManagerFlags",
13280                value: tmp as u32,
13281            })?;
13282        for v in &mut __struct.q {
13283            let val = buf.get_f32_le();
13284            *v = val;
13285        }
13286        __struct.angular_velocity_x = buf.get_f32_le();
13287        __struct.angular_velocity_y = buf.get_f32_le();
13288        __struct.angular_velocity_z = buf.get_f32_le();
13289        __struct.target_system = buf.get_u8();
13290        __struct.target_component = buf.get_u8();
13291        __struct.gimbal_device_id = buf.get_u8();
13292        Ok(__struct)
13293    }
13294    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13295        let mut __tmp = BytesMut::new(bytes);
13296        #[allow(clippy::absurd_extreme_comparisons)]
13297        #[allow(unused_comparisons)]
13298        if __tmp.remaining() < Self::ENCODED_LEN {
13299            panic!(
13300                "buffer is too small (need {} bytes, but got {})",
13301                Self::ENCODED_LEN,
13302                __tmp.remaining(),
13303            )
13304        }
13305        __tmp.put_u32_le(self.flags.bits());
13306        for val in &self.q {
13307            __tmp.put_f32_le(*val);
13308        }
13309        __tmp.put_f32_le(self.angular_velocity_x);
13310        __tmp.put_f32_le(self.angular_velocity_y);
13311        __tmp.put_f32_le(self.angular_velocity_z);
13312        __tmp.put_u8(self.target_system);
13313        __tmp.put_u8(self.target_component);
13314        __tmp.put_u8(self.gimbal_device_id);
13315        if matches!(version, MavlinkVersion::V2) {
13316            let len = __tmp.len();
13317            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13318        } else {
13319            __tmp.len()
13320        }
13321    }
13322}
13323#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13324#[doc = ""]
13325#[doc = "ID: 288"]
13326#[derive(Debug, Clone, PartialEq)]
13327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13329#[cfg_attr(feature = "ts", derive(TS))]
13330#[cfg_attr(feature = "ts", ts(export))]
13331pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13332    #[doc = "High level gimbal manager flags."]
13333    pub flags: GimbalManagerFlags,
13334    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13335    pub pitch: f32,
13336    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13337    pub yaw: f32,
13338    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13339    pub pitch_rate: f32,
13340    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13341    pub yaw_rate: f32,
13342    #[doc = "System ID"]
13343    pub target_system: u8,
13344    #[doc = "Component ID"]
13345    pub target_component: u8,
13346    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13347    pub gimbal_device_id: u8,
13348}
13349impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13350    pub const ENCODED_LEN: usize = 23usize;
13351    pub const DEFAULT: Self = Self {
13352        flags: GimbalManagerFlags::DEFAULT,
13353        pitch: 0.0_f32,
13354        yaw: 0.0_f32,
13355        pitch_rate: 0.0_f32,
13356        yaw_rate: 0.0_f32,
13357        target_system: 0_u8,
13358        target_component: 0_u8,
13359        gimbal_device_id: 0_u8,
13360    };
13361    #[cfg(feature = "arbitrary")]
13362    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13363        use arbitrary::{Arbitrary, Unstructured};
13364        let mut buf = [0u8; 1024];
13365        rng.fill_bytes(&mut buf);
13366        let mut unstructured = Unstructured::new(&buf);
13367        Self::arbitrary(&mut unstructured).unwrap_or_default()
13368    }
13369}
13370impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13371    fn default() -> Self {
13372        Self::DEFAULT.clone()
13373    }
13374}
13375impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13376    type Message = MavMessage;
13377    const ID: u32 = 288u32;
13378    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13379    const EXTRA_CRC: u8 = 20u8;
13380    const ENCODED_LEN: usize = 23usize;
13381    fn deser(
13382        _version: MavlinkVersion,
13383        __input: &[u8],
13384    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13385        let avail_len = __input.len();
13386        let mut payload_buf = [0; Self::ENCODED_LEN];
13387        let mut buf = if avail_len < Self::ENCODED_LEN {
13388            payload_buf[0..avail_len].copy_from_slice(__input);
13389            Bytes::new(&payload_buf)
13390        } else {
13391            Bytes::new(__input)
13392        };
13393        let mut __struct = Self::default();
13394        let tmp = buf.get_u32_le();
13395        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13396            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13397                flag_type: "GimbalManagerFlags",
13398                value: tmp as u32,
13399            })?;
13400        __struct.pitch = buf.get_f32_le();
13401        __struct.yaw = buf.get_f32_le();
13402        __struct.pitch_rate = buf.get_f32_le();
13403        __struct.yaw_rate = buf.get_f32_le();
13404        __struct.target_system = buf.get_u8();
13405        __struct.target_component = buf.get_u8();
13406        __struct.gimbal_device_id = buf.get_u8();
13407        Ok(__struct)
13408    }
13409    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13410        let mut __tmp = BytesMut::new(bytes);
13411        #[allow(clippy::absurd_extreme_comparisons)]
13412        #[allow(unused_comparisons)]
13413        if __tmp.remaining() < Self::ENCODED_LEN {
13414            panic!(
13415                "buffer is too small (need {} bytes, but got {})",
13416                Self::ENCODED_LEN,
13417                __tmp.remaining(),
13418            )
13419        }
13420        __tmp.put_u32_le(self.flags.bits());
13421        __tmp.put_f32_le(self.pitch);
13422        __tmp.put_f32_le(self.yaw);
13423        __tmp.put_f32_le(self.pitch_rate);
13424        __tmp.put_f32_le(self.yaw_rate);
13425        __tmp.put_u8(self.target_system);
13426        __tmp.put_u8(self.target_component);
13427        __tmp.put_u8(self.gimbal_device_id);
13428        if matches!(version, MavlinkVersion::V2) {
13429            let len = __tmp.len();
13430            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13431        } else {
13432            __tmp.len()
13433        }
13434    }
13435}
13436#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13437#[doc = ""]
13438#[doc = "ID: 287"]
13439#[derive(Debug, Clone, PartialEq)]
13440#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13442#[cfg_attr(feature = "ts", derive(TS))]
13443#[cfg_attr(feature = "ts", ts(export))]
13444pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13445    #[doc = "High level gimbal manager flags to use."]
13446    pub flags: GimbalManagerFlags,
13447    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13448    pub pitch: f32,
13449    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13450    pub yaw: f32,
13451    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13452    pub pitch_rate: f32,
13453    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13454    pub yaw_rate: f32,
13455    #[doc = "System ID"]
13456    pub target_system: u8,
13457    #[doc = "Component ID"]
13458    pub target_component: u8,
13459    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13460    pub gimbal_device_id: u8,
13461}
13462impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13463    pub const ENCODED_LEN: usize = 23usize;
13464    pub const DEFAULT: Self = Self {
13465        flags: GimbalManagerFlags::DEFAULT,
13466        pitch: 0.0_f32,
13467        yaw: 0.0_f32,
13468        pitch_rate: 0.0_f32,
13469        yaw_rate: 0.0_f32,
13470        target_system: 0_u8,
13471        target_component: 0_u8,
13472        gimbal_device_id: 0_u8,
13473    };
13474    #[cfg(feature = "arbitrary")]
13475    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13476        use arbitrary::{Arbitrary, Unstructured};
13477        let mut buf = [0u8; 1024];
13478        rng.fill_bytes(&mut buf);
13479        let mut unstructured = Unstructured::new(&buf);
13480        Self::arbitrary(&mut unstructured).unwrap_or_default()
13481    }
13482}
13483impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13484    fn default() -> Self {
13485        Self::DEFAULT.clone()
13486    }
13487}
13488impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13489    type Message = MavMessage;
13490    const ID: u32 = 287u32;
13491    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13492    const EXTRA_CRC: u8 = 1u8;
13493    const ENCODED_LEN: usize = 23usize;
13494    fn deser(
13495        _version: MavlinkVersion,
13496        __input: &[u8],
13497    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13498        let avail_len = __input.len();
13499        let mut payload_buf = [0; Self::ENCODED_LEN];
13500        let mut buf = if avail_len < Self::ENCODED_LEN {
13501            payload_buf[0..avail_len].copy_from_slice(__input);
13502            Bytes::new(&payload_buf)
13503        } else {
13504            Bytes::new(__input)
13505        };
13506        let mut __struct = Self::default();
13507        let tmp = buf.get_u32_le();
13508        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13509            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13510                flag_type: "GimbalManagerFlags",
13511                value: tmp as u32,
13512            })?;
13513        __struct.pitch = buf.get_f32_le();
13514        __struct.yaw = buf.get_f32_le();
13515        __struct.pitch_rate = buf.get_f32_le();
13516        __struct.yaw_rate = buf.get_f32_le();
13517        __struct.target_system = buf.get_u8();
13518        __struct.target_component = buf.get_u8();
13519        __struct.gimbal_device_id = buf.get_u8();
13520        Ok(__struct)
13521    }
13522    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13523        let mut __tmp = BytesMut::new(bytes);
13524        #[allow(clippy::absurd_extreme_comparisons)]
13525        #[allow(unused_comparisons)]
13526        if __tmp.remaining() < Self::ENCODED_LEN {
13527            panic!(
13528                "buffer is too small (need {} bytes, but got {})",
13529                Self::ENCODED_LEN,
13530                __tmp.remaining(),
13531            )
13532        }
13533        __tmp.put_u32_le(self.flags.bits());
13534        __tmp.put_f32_le(self.pitch);
13535        __tmp.put_f32_le(self.yaw);
13536        __tmp.put_f32_le(self.pitch_rate);
13537        __tmp.put_f32_le(self.yaw_rate);
13538        __tmp.put_u8(self.target_system);
13539        __tmp.put_u8(self.target_component);
13540        __tmp.put_u8(self.gimbal_device_id);
13541        if matches!(version, MavlinkVersion::V2) {
13542            let len = __tmp.len();
13543            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13544        } else {
13545            __tmp.len()
13546        }
13547    }
13548}
13549#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13550#[doc = ""]
13551#[doc = "ID: 281"]
13552#[derive(Debug, Clone, PartialEq)]
13553#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13554#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13555#[cfg_attr(feature = "ts", derive(TS))]
13556#[cfg_attr(feature = "ts", ts(export))]
13557pub struct GIMBAL_MANAGER_STATUS_DATA {
13558    #[doc = "Timestamp (time since system boot)."]
13559    pub time_boot_ms: u32,
13560    #[doc = "High level gimbal manager flags currently applied."]
13561    pub flags: GimbalManagerFlags,
13562    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13563    pub gimbal_device_id: u8,
13564    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13565    pub primary_control_sysid: u8,
13566    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13567    pub primary_control_compid: u8,
13568    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13569    pub secondary_control_sysid: u8,
13570    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13571    pub secondary_control_compid: u8,
13572}
13573impl GIMBAL_MANAGER_STATUS_DATA {
13574    pub const ENCODED_LEN: usize = 13usize;
13575    pub const DEFAULT: Self = Self {
13576        time_boot_ms: 0_u32,
13577        flags: GimbalManagerFlags::DEFAULT,
13578        gimbal_device_id: 0_u8,
13579        primary_control_sysid: 0_u8,
13580        primary_control_compid: 0_u8,
13581        secondary_control_sysid: 0_u8,
13582        secondary_control_compid: 0_u8,
13583    };
13584    #[cfg(feature = "arbitrary")]
13585    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13586        use arbitrary::{Arbitrary, Unstructured};
13587        let mut buf = [0u8; 1024];
13588        rng.fill_bytes(&mut buf);
13589        let mut unstructured = Unstructured::new(&buf);
13590        Self::arbitrary(&mut unstructured).unwrap_or_default()
13591    }
13592}
13593impl Default for GIMBAL_MANAGER_STATUS_DATA {
13594    fn default() -> Self {
13595        Self::DEFAULT.clone()
13596    }
13597}
13598impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13599    type Message = MavMessage;
13600    const ID: u32 = 281u32;
13601    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13602    const EXTRA_CRC: u8 = 48u8;
13603    const ENCODED_LEN: usize = 13usize;
13604    fn deser(
13605        _version: MavlinkVersion,
13606        __input: &[u8],
13607    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13608        let avail_len = __input.len();
13609        let mut payload_buf = [0; Self::ENCODED_LEN];
13610        let mut buf = if avail_len < Self::ENCODED_LEN {
13611            payload_buf[0..avail_len].copy_from_slice(__input);
13612            Bytes::new(&payload_buf)
13613        } else {
13614            Bytes::new(__input)
13615        };
13616        let mut __struct = Self::default();
13617        __struct.time_boot_ms = buf.get_u32_le();
13618        let tmp = buf.get_u32_le();
13619        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13620            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13621                flag_type: "GimbalManagerFlags",
13622                value: tmp as u32,
13623            })?;
13624        __struct.gimbal_device_id = buf.get_u8();
13625        __struct.primary_control_sysid = buf.get_u8();
13626        __struct.primary_control_compid = buf.get_u8();
13627        __struct.secondary_control_sysid = buf.get_u8();
13628        __struct.secondary_control_compid = buf.get_u8();
13629        Ok(__struct)
13630    }
13631    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13632        let mut __tmp = BytesMut::new(bytes);
13633        #[allow(clippy::absurd_extreme_comparisons)]
13634        #[allow(unused_comparisons)]
13635        if __tmp.remaining() < Self::ENCODED_LEN {
13636            panic!(
13637                "buffer is too small (need {} bytes, but got {})",
13638                Self::ENCODED_LEN,
13639                __tmp.remaining(),
13640            )
13641        }
13642        __tmp.put_u32_le(self.time_boot_ms);
13643        __tmp.put_u32_le(self.flags.bits());
13644        __tmp.put_u8(self.gimbal_device_id);
13645        __tmp.put_u8(self.primary_control_sysid);
13646        __tmp.put_u8(self.primary_control_compid);
13647        __tmp.put_u8(self.secondary_control_sysid);
13648        __tmp.put_u8(self.secondary_control_compid);
13649        if matches!(version, MavlinkVersion::V2) {
13650            let len = __tmp.len();
13651            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13652        } else {
13653            __tmp.len()
13654        }
13655    }
13656}
13657#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13658#[doc = ""]
13659#[doc = "ID: 33"]
13660#[derive(Debug, Clone, PartialEq)]
13661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13663#[cfg_attr(feature = "ts", derive(TS))]
13664#[cfg_attr(feature = "ts", ts(export))]
13665pub struct GLOBAL_POSITION_INT_DATA {
13666    #[doc = "Timestamp (time since system boot)."]
13667    pub time_boot_ms: u32,
13668    #[doc = "Latitude, expressed"]
13669    pub lat: i32,
13670    #[doc = "Longitude, expressed"]
13671    pub lon: i32,
13672    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13673    pub alt: i32,
13674    #[doc = "Altitude above home"]
13675    pub relative_alt: i32,
13676    #[doc = "Ground X Speed (Latitude, positive north)"]
13677    pub vx: i16,
13678    #[doc = "Ground Y Speed (Longitude, positive east)"]
13679    pub vy: i16,
13680    #[doc = "Ground Z Speed (Altitude, positive down)"]
13681    pub vz: i16,
13682    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13683    pub hdg: u16,
13684}
13685impl GLOBAL_POSITION_INT_DATA {
13686    pub const ENCODED_LEN: usize = 28usize;
13687    pub const DEFAULT: Self = Self {
13688        time_boot_ms: 0_u32,
13689        lat: 0_i32,
13690        lon: 0_i32,
13691        alt: 0_i32,
13692        relative_alt: 0_i32,
13693        vx: 0_i16,
13694        vy: 0_i16,
13695        vz: 0_i16,
13696        hdg: 0_u16,
13697    };
13698    #[cfg(feature = "arbitrary")]
13699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13700        use arbitrary::{Arbitrary, Unstructured};
13701        let mut buf = [0u8; 1024];
13702        rng.fill_bytes(&mut buf);
13703        let mut unstructured = Unstructured::new(&buf);
13704        Self::arbitrary(&mut unstructured).unwrap_or_default()
13705    }
13706}
13707impl Default for GLOBAL_POSITION_INT_DATA {
13708    fn default() -> Self {
13709        Self::DEFAULT.clone()
13710    }
13711}
13712impl MessageData for GLOBAL_POSITION_INT_DATA {
13713    type Message = MavMessage;
13714    const ID: u32 = 33u32;
13715    const NAME: &'static str = "GLOBAL_POSITION_INT";
13716    const EXTRA_CRC: u8 = 104u8;
13717    const ENCODED_LEN: usize = 28usize;
13718    fn deser(
13719        _version: MavlinkVersion,
13720        __input: &[u8],
13721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13722        let avail_len = __input.len();
13723        let mut payload_buf = [0; Self::ENCODED_LEN];
13724        let mut buf = if avail_len < Self::ENCODED_LEN {
13725            payload_buf[0..avail_len].copy_from_slice(__input);
13726            Bytes::new(&payload_buf)
13727        } else {
13728            Bytes::new(__input)
13729        };
13730        let mut __struct = Self::default();
13731        __struct.time_boot_ms = buf.get_u32_le();
13732        __struct.lat = buf.get_i32_le();
13733        __struct.lon = buf.get_i32_le();
13734        __struct.alt = buf.get_i32_le();
13735        __struct.relative_alt = buf.get_i32_le();
13736        __struct.vx = buf.get_i16_le();
13737        __struct.vy = buf.get_i16_le();
13738        __struct.vz = buf.get_i16_le();
13739        __struct.hdg = buf.get_u16_le();
13740        Ok(__struct)
13741    }
13742    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13743        let mut __tmp = BytesMut::new(bytes);
13744        #[allow(clippy::absurd_extreme_comparisons)]
13745        #[allow(unused_comparisons)]
13746        if __tmp.remaining() < Self::ENCODED_LEN {
13747            panic!(
13748                "buffer is too small (need {} bytes, but got {})",
13749                Self::ENCODED_LEN,
13750                __tmp.remaining(),
13751            )
13752        }
13753        __tmp.put_u32_le(self.time_boot_ms);
13754        __tmp.put_i32_le(self.lat);
13755        __tmp.put_i32_le(self.lon);
13756        __tmp.put_i32_le(self.alt);
13757        __tmp.put_i32_le(self.relative_alt);
13758        __tmp.put_i16_le(self.vx);
13759        __tmp.put_i16_le(self.vy);
13760        __tmp.put_i16_le(self.vz);
13761        __tmp.put_u16_le(self.hdg);
13762        if matches!(version, MavlinkVersion::V2) {
13763            let len = __tmp.len();
13764            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13765        } else {
13766            __tmp.len()
13767        }
13768    }
13769}
13770#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13771#[doc = ""]
13772#[doc = "ID: 63"]
13773#[derive(Debug, Clone, PartialEq)]
13774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13776#[cfg_attr(feature = "ts", derive(TS))]
13777#[cfg_attr(feature = "ts", ts(export))]
13778pub struct GLOBAL_POSITION_INT_COV_DATA {
13779    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13780    pub time_usec: u64,
13781    #[doc = "Latitude"]
13782    pub lat: i32,
13783    #[doc = "Longitude"]
13784    pub lon: i32,
13785    #[doc = "Altitude in meters above MSL"]
13786    pub alt: i32,
13787    #[doc = "Altitude above ground"]
13788    pub relative_alt: i32,
13789    #[doc = "Ground X Speed (Latitude)"]
13790    pub vx: f32,
13791    #[doc = "Ground Y Speed (Longitude)"]
13792    pub vy: f32,
13793    #[doc = "Ground Z Speed (Altitude)"]
13794    pub vz: f32,
13795    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13796    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13797    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13798    pub covariance: [f32; 36],
13799    #[doc = "Class id of the estimator this estimate originated from."]
13800    pub estimator_type: MavEstimatorType,
13801}
13802impl GLOBAL_POSITION_INT_COV_DATA {
13803    pub const ENCODED_LEN: usize = 181usize;
13804    pub const DEFAULT: Self = Self {
13805        time_usec: 0_u64,
13806        lat: 0_i32,
13807        lon: 0_i32,
13808        alt: 0_i32,
13809        relative_alt: 0_i32,
13810        vx: 0.0_f32,
13811        vy: 0.0_f32,
13812        vz: 0.0_f32,
13813        covariance: [0.0_f32; 36usize],
13814        estimator_type: MavEstimatorType::DEFAULT,
13815    };
13816    #[cfg(feature = "arbitrary")]
13817    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13818        use arbitrary::{Arbitrary, Unstructured};
13819        let mut buf = [0u8; 1024];
13820        rng.fill_bytes(&mut buf);
13821        let mut unstructured = Unstructured::new(&buf);
13822        Self::arbitrary(&mut unstructured).unwrap_or_default()
13823    }
13824}
13825impl Default for GLOBAL_POSITION_INT_COV_DATA {
13826    fn default() -> Self {
13827        Self::DEFAULT.clone()
13828    }
13829}
13830impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13831    type Message = MavMessage;
13832    const ID: u32 = 63u32;
13833    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13834    const EXTRA_CRC: u8 = 119u8;
13835    const ENCODED_LEN: usize = 181usize;
13836    fn deser(
13837        _version: MavlinkVersion,
13838        __input: &[u8],
13839    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13840        let avail_len = __input.len();
13841        let mut payload_buf = [0; Self::ENCODED_LEN];
13842        let mut buf = if avail_len < Self::ENCODED_LEN {
13843            payload_buf[0..avail_len].copy_from_slice(__input);
13844            Bytes::new(&payload_buf)
13845        } else {
13846            Bytes::new(__input)
13847        };
13848        let mut __struct = Self::default();
13849        __struct.time_usec = buf.get_u64_le();
13850        __struct.lat = buf.get_i32_le();
13851        __struct.lon = buf.get_i32_le();
13852        __struct.alt = buf.get_i32_le();
13853        __struct.relative_alt = buf.get_i32_le();
13854        __struct.vx = buf.get_f32_le();
13855        __struct.vy = buf.get_f32_le();
13856        __struct.vz = buf.get_f32_le();
13857        for v in &mut __struct.covariance {
13858            let val = buf.get_f32_le();
13859            *v = val;
13860        }
13861        let tmp = buf.get_u8();
13862        __struct.estimator_type =
13863            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13864                enum_type: "MavEstimatorType",
13865                value: tmp as u32,
13866            })?;
13867        Ok(__struct)
13868    }
13869    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13870        let mut __tmp = BytesMut::new(bytes);
13871        #[allow(clippy::absurd_extreme_comparisons)]
13872        #[allow(unused_comparisons)]
13873        if __tmp.remaining() < Self::ENCODED_LEN {
13874            panic!(
13875                "buffer is too small (need {} bytes, but got {})",
13876                Self::ENCODED_LEN,
13877                __tmp.remaining(),
13878            )
13879        }
13880        __tmp.put_u64_le(self.time_usec);
13881        __tmp.put_i32_le(self.lat);
13882        __tmp.put_i32_le(self.lon);
13883        __tmp.put_i32_le(self.alt);
13884        __tmp.put_i32_le(self.relative_alt);
13885        __tmp.put_f32_le(self.vx);
13886        __tmp.put_f32_le(self.vy);
13887        __tmp.put_f32_le(self.vz);
13888        for val in &self.covariance {
13889            __tmp.put_f32_le(*val);
13890        }
13891        __tmp.put_u8(self.estimator_type as u8);
13892        if matches!(version, MavlinkVersion::V2) {
13893            let len = __tmp.len();
13894            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13895        } else {
13896            __tmp.len()
13897        }
13898    }
13899}
13900#[doc = "Global position/attitude estimate from a vision source."]
13901#[doc = ""]
13902#[doc = "ID: 101"]
13903#[derive(Debug, Clone, PartialEq)]
13904#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13905#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13906#[cfg_attr(feature = "ts", derive(TS))]
13907#[cfg_attr(feature = "ts", ts(export))]
13908pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13909    #[doc = "Timestamp (UNIX time or since system boot)"]
13910    pub usec: u64,
13911    #[doc = "Global X position"]
13912    pub x: f32,
13913    #[doc = "Global Y position"]
13914    pub y: f32,
13915    #[doc = "Global Z position"]
13916    pub z: f32,
13917    #[doc = "Roll angle"]
13918    pub roll: f32,
13919    #[doc = "Pitch angle"]
13920    pub pitch: f32,
13921    #[doc = "Yaw angle"]
13922    pub yaw: f32,
13923    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13924    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13925    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13926    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13927    pub covariance: [f32; 21],
13928    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13929    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13930    pub reset_counter: u8,
13931}
13932impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13933    pub const ENCODED_LEN: usize = 117usize;
13934    pub const DEFAULT: Self = Self {
13935        usec: 0_u64,
13936        x: 0.0_f32,
13937        y: 0.0_f32,
13938        z: 0.0_f32,
13939        roll: 0.0_f32,
13940        pitch: 0.0_f32,
13941        yaw: 0.0_f32,
13942        covariance: [0.0_f32; 21usize],
13943        reset_counter: 0_u8,
13944    };
13945    #[cfg(feature = "arbitrary")]
13946    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13947        use arbitrary::{Arbitrary, Unstructured};
13948        let mut buf = [0u8; 1024];
13949        rng.fill_bytes(&mut buf);
13950        let mut unstructured = Unstructured::new(&buf);
13951        Self::arbitrary(&mut unstructured).unwrap_or_default()
13952    }
13953}
13954impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13955    fn default() -> Self {
13956        Self::DEFAULT.clone()
13957    }
13958}
13959impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13960    type Message = MavMessage;
13961    const ID: u32 = 101u32;
13962    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13963    const EXTRA_CRC: u8 = 102u8;
13964    const ENCODED_LEN: usize = 117usize;
13965    fn deser(
13966        _version: MavlinkVersion,
13967        __input: &[u8],
13968    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13969        let avail_len = __input.len();
13970        let mut payload_buf = [0; Self::ENCODED_LEN];
13971        let mut buf = if avail_len < Self::ENCODED_LEN {
13972            payload_buf[0..avail_len].copy_from_slice(__input);
13973            Bytes::new(&payload_buf)
13974        } else {
13975            Bytes::new(__input)
13976        };
13977        let mut __struct = Self::default();
13978        __struct.usec = buf.get_u64_le();
13979        __struct.x = buf.get_f32_le();
13980        __struct.y = buf.get_f32_le();
13981        __struct.z = buf.get_f32_le();
13982        __struct.roll = buf.get_f32_le();
13983        __struct.pitch = buf.get_f32_le();
13984        __struct.yaw = buf.get_f32_le();
13985        for v in &mut __struct.covariance {
13986            let val = buf.get_f32_le();
13987            *v = val;
13988        }
13989        __struct.reset_counter = buf.get_u8();
13990        Ok(__struct)
13991    }
13992    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13993        let mut __tmp = BytesMut::new(bytes);
13994        #[allow(clippy::absurd_extreme_comparisons)]
13995        #[allow(unused_comparisons)]
13996        if __tmp.remaining() < Self::ENCODED_LEN {
13997            panic!(
13998                "buffer is too small (need {} bytes, but got {})",
13999                Self::ENCODED_LEN,
14000                __tmp.remaining(),
14001            )
14002        }
14003        __tmp.put_u64_le(self.usec);
14004        __tmp.put_f32_le(self.x);
14005        __tmp.put_f32_le(self.y);
14006        __tmp.put_f32_le(self.z);
14007        __tmp.put_f32_le(self.roll);
14008        __tmp.put_f32_le(self.pitch);
14009        __tmp.put_f32_le(self.yaw);
14010        if matches!(version, MavlinkVersion::V2) {
14011            for val in &self.covariance {
14012                __tmp.put_f32_le(*val);
14013            }
14014            __tmp.put_u8(self.reset_counter);
14015            let len = __tmp.len();
14016            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14017        } else {
14018            __tmp.len()
14019        }
14020    }
14021}
14022#[doc = "Second GPS data."]
14023#[doc = ""]
14024#[doc = "ID: 124"]
14025#[derive(Debug, Clone, PartialEq)]
14026#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14027#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14028#[cfg_attr(feature = "ts", derive(TS))]
14029#[cfg_attr(feature = "ts", ts(export))]
14030pub struct GPS2_RAW_DATA {
14031    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14032    pub time_usec: u64,
14033    #[doc = "Latitude (WGS84)"]
14034    pub lat: i32,
14035    #[doc = "Longitude (WGS84)"]
14036    pub lon: i32,
14037    #[doc = "Altitude (MSL). Positive for up."]
14038    pub alt: i32,
14039    #[doc = "Age of DGPS info"]
14040    pub dgps_age: u32,
14041    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14042    pub eph: u16,
14043    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14044    pub epv: u16,
14045    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14046    pub vel: u16,
14047    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14048    pub cog: u16,
14049    #[doc = "GPS fix type."]
14050    pub fix_type: GpsFixType,
14051    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14052    pub satellites_visible: u8,
14053    #[doc = "Number of DGPS satellites"]
14054    pub dgps_numch: u8,
14055    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14056    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14057    pub yaw: u16,
14058    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14059    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14060    pub alt_ellipsoid: i32,
14061    #[doc = "Position uncertainty."]
14062    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14063    pub h_acc: u32,
14064    #[doc = "Altitude uncertainty."]
14065    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14066    pub v_acc: u32,
14067    #[doc = "Speed uncertainty."]
14068    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14069    pub vel_acc: u32,
14070    #[doc = "Heading / track uncertainty"]
14071    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14072    pub hdg_acc: u32,
14073}
14074impl GPS2_RAW_DATA {
14075    pub const ENCODED_LEN: usize = 57usize;
14076    pub const DEFAULT: Self = Self {
14077        time_usec: 0_u64,
14078        lat: 0_i32,
14079        lon: 0_i32,
14080        alt: 0_i32,
14081        dgps_age: 0_u32,
14082        eph: 0_u16,
14083        epv: 0_u16,
14084        vel: 0_u16,
14085        cog: 0_u16,
14086        fix_type: GpsFixType::DEFAULT,
14087        satellites_visible: 0_u8,
14088        dgps_numch: 0_u8,
14089        yaw: 0_u16,
14090        alt_ellipsoid: 0_i32,
14091        h_acc: 0_u32,
14092        v_acc: 0_u32,
14093        vel_acc: 0_u32,
14094        hdg_acc: 0_u32,
14095    };
14096    #[cfg(feature = "arbitrary")]
14097    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14098        use arbitrary::{Arbitrary, Unstructured};
14099        let mut buf = [0u8; 1024];
14100        rng.fill_bytes(&mut buf);
14101        let mut unstructured = Unstructured::new(&buf);
14102        Self::arbitrary(&mut unstructured).unwrap_or_default()
14103    }
14104}
14105impl Default for GPS2_RAW_DATA {
14106    fn default() -> Self {
14107        Self::DEFAULT.clone()
14108    }
14109}
14110impl MessageData for GPS2_RAW_DATA {
14111    type Message = MavMessage;
14112    const ID: u32 = 124u32;
14113    const NAME: &'static str = "GPS2_RAW";
14114    const EXTRA_CRC: u8 = 87u8;
14115    const ENCODED_LEN: usize = 57usize;
14116    fn deser(
14117        _version: MavlinkVersion,
14118        __input: &[u8],
14119    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14120        let avail_len = __input.len();
14121        let mut payload_buf = [0; Self::ENCODED_LEN];
14122        let mut buf = if avail_len < Self::ENCODED_LEN {
14123            payload_buf[0..avail_len].copy_from_slice(__input);
14124            Bytes::new(&payload_buf)
14125        } else {
14126            Bytes::new(__input)
14127        };
14128        let mut __struct = Self::default();
14129        __struct.time_usec = buf.get_u64_le();
14130        __struct.lat = buf.get_i32_le();
14131        __struct.lon = buf.get_i32_le();
14132        __struct.alt = buf.get_i32_le();
14133        __struct.dgps_age = buf.get_u32_le();
14134        __struct.eph = buf.get_u16_le();
14135        __struct.epv = buf.get_u16_le();
14136        __struct.vel = buf.get_u16_le();
14137        __struct.cog = buf.get_u16_le();
14138        let tmp = buf.get_u8();
14139        __struct.fix_type =
14140            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14141                enum_type: "GpsFixType",
14142                value: tmp as u32,
14143            })?;
14144        __struct.satellites_visible = buf.get_u8();
14145        __struct.dgps_numch = buf.get_u8();
14146        __struct.yaw = buf.get_u16_le();
14147        __struct.alt_ellipsoid = buf.get_i32_le();
14148        __struct.h_acc = buf.get_u32_le();
14149        __struct.v_acc = buf.get_u32_le();
14150        __struct.vel_acc = buf.get_u32_le();
14151        __struct.hdg_acc = buf.get_u32_le();
14152        Ok(__struct)
14153    }
14154    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14155        let mut __tmp = BytesMut::new(bytes);
14156        #[allow(clippy::absurd_extreme_comparisons)]
14157        #[allow(unused_comparisons)]
14158        if __tmp.remaining() < Self::ENCODED_LEN {
14159            panic!(
14160                "buffer is too small (need {} bytes, but got {})",
14161                Self::ENCODED_LEN,
14162                __tmp.remaining(),
14163            )
14164        }
14165        __tmp.put_u64_le(self.time_usec);
14166        __tmp.put_i32_le(self.lat);
14167        __tmp.put_i32_le(self.lon);
14168        __tmp.put_i32_le(self.alt);
14169        __tmp.put_u32_le(self.dgps_age);
14170        __tmp.put_u16_le(self.eph);
14171        __tmp.put_u16_le(self.epv);
14172        __tmp.put_u16_le(self.vel);
14173        __tmp.put_u16_le(self.cog);
14174        __tmp.put_u8(self.fix_type as u8);
14175        __tmp.put_u8(self.satellites_visible);
14176        __tmp.put_u8(self.dgps_numch);
14177        if matches!(version, MavlinkVersion::V2) {
14178            __tmp.put_u16_le(self.yaw);
14179            __tmp.put_i32_le(self.alt_ellipsoid);
14180            __tmp.put_u32_le(self.h_acc);
14181            __tmp.put_u32_le(self.v_acc);
14182            __tmp.put_u32_le(self.vel_acc);
14183            __tmp.put_u32_le(self.hdg_acc);
14184            let len = __tmp.len();
14185            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14186        } else {
14187            __tmp.len()
14188        }
14189    }
14190}
14191#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14192#[doc = ""]
14193#[doc = "ID: 128"]
14194#[derive(Debug, Clone, PartialEq)]
14195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14196#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14197#[cfg_attr(feature = "ts", derive(TS))]
14198#[cfg_attr(feature = "ts", ts(export))]
14199pub struct GPS2_RTK_DATA {
14200    #[doc = "Time since boot of last baseline message received."]
14201    pub time_last_baseline_ms: u32,
14202    #[doc = "GPS Time of Week of last baseline"]
14203    pub tow: u32,
14204    #[doc = "Current baseline in ECEF x or NED north component."]
14205    pub baseline_a_mm: i32,
14206    #[doc = "Current baseline in ECEF y or NED east component."]
14207    pub baseline_b_mm: i32,
14208    #[doc = "Current baseline in ECEF z or NED down component."]
14209    pub baseline_c_mm: i32,
14210    #[doc = "Current estimate of baseline accuracy."]
14211    pub accuracy: u32,
14212    #[doc = "Current number of integer ambiguity hypotheses."]
14213    pub iar_num_hypotheses: i32,
14214    #[doc = "GPS Week Number of last baseline"]
14215    pub wn: u16,
14216    #[doc = "Identification of connected RTK receiver."]
14217    pub rtk_receiver_id: u8,
14218    #[doc = "GPS-specific health report for RTK data."]
14219    pub rtk_health: u8,
14220    #[doc = "Rate of baseline messages being received by GPS"]
14221    pub rtk_rate: u8,
14222    #[doc = "Current number of sats used for RTK calculation."]
14223    pub nsats: u8,
14224    #[doc = "Coordinate system of baseline"]
14225    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14226}
14227impl GPS2_RTK_DATA {
14228    pub const ENCODED_LEN: usize = 35usize;
14229    pub const DEFAULT: Self = Self {
14230        time_last_baseline_ms: 0_u32,
14231        tow: 0_u32,
14232        baseline_a_mm: 0_i32,
14233        baseline_b_mm: 0_i32,
14234        baseline_c_mm: 0_i32,
14235        accuracy: 0_u32,
14236        iar_num_hypotheses: 0_i32,
14237        wn: 0_u16,
14238        rtk_receiver_id: 0_u8,
14239        rtk_health: 0_u8,
14240        rtk_rate: 0_u8,
14241        nsats: 0_u8,
14242        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14243    };
14244    #[cfg(feature = "arbitrary")]
14245    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14246        use arbitrary::{Arbitrary, Unstructured};
14247        let mut buf = [0u8; 1024];
14248        rng.fill_bytes(&mut buf);
14249        let mut unstructured = Unstructured::new(&buf);
14250        Self::arbitrary(&mut unstructured).unwrap_or_default()
14251    }
14252}
14253impl Default for GPS2_RTK_DATA {
14254    fn default() -> Self {
14255        Self::DEFAULT.clone()
14256    }
14257}
14258impl MessageData for GPS2_RTK_DATA {
14259    type Message = MavMessage;
14260    const ID: u32 = 128u32;
14261    const NAME: &'static str = "GPS2_RTK";
14262    const EXTRA_CRC: u8 = 226u8;
14263    const ENCODED_LEN: usize = 35usize;
14264    fn deser(
14265        _version: MavlinkVersion,
14266        __input: &[u8],
14267    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14268        let avail_len = __input.len();
14269        let mut payload_buf = [0; Self::ENCODED_LEN];
14270        let mut buf = if avail_len < Self::ENCODED_LEN {
14271            payload_buf[0..avail_len].copy_from_slice(__input);
14272            Bytes::new(&payload_buf)
14273        } else {
14274            Bytes::new(__input)
14275        };
14276        let mut __struct = Self::default();
14277        __struct.time_last_baseline_ms = buf.get_u32_le();
14278        __struct.tow = buf.get_u32_le();
14279        __struct.baseline_a_mm = buf.get_i32_le();
14280        __struct.baseline_b_mm = buf.get_i32_le();
14281        __struct.baseline_c_mm = buf.get_i32_le();
14282        __struct.accuracy = buf.get_u32_le();
14283        __struct.iar_num_hypotheses = buf.get_i32_le();
14284        __struct.wn = buf.get_u16_le();
14285        __struct.rtk_receiver_id = buf.get_u8();
14286        __struct.rtk_health = buf.get_u8();
14287        __struct.rtk_rate = buf.get_u8();
14288        __struct.nsats = buf.get_u8();
14289        let tmp = buf.get_u8();
14290        __struct.baseline_coords_type =
14291            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14292                enum_type: "RtkBaselineCoordinateSystem",
14293                value: tmp as u32,
14294            })?;
14295        Ok(__struct)
14296    }
14297    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14298        let mut __tmp = BytesMut::new(bytes);
14299        #[allow(clippy::absurd_extreme_comparisons)]
14300        #[allow(unused_comparisons)]
14301        if __tmp.remaining() < Self::ENCODED_LEN {
14302            panic!(
14303                "buffer is too small (need {} bytes, but got {})",
14304                Self::ENCODED_LEN,
14305                __tmp.remaining(),
14306            )
14307        }
14308        __tmp.put_u32_le(self.time_last_baseline_ms);
14309        __tmp.put_u32_le(self.tow);
14310        __tmp.put_i32_le(self.baseline_a_mm);
14311        __tmp.put_i32_le(self.baseline_b_mm);
14312        __tmp.put_i32_le(self.baseline_c_mm);
14313        __tmp.put_u32_le(self.accuracy);
14314        __tmp.put_i32_le(self.iar_num_hypotheses);
14315        __tmp.put_u16_le(self.wn);
14316        __tmp.put_u8(self.rtk_receiver_id);
14317        __tmp.put_u8(self.rtk_health);
14318        __tmp.put_u8(self.rtk_rate);
14319        __tmp.put_u8(self.nsats);
14320        __tmp.put_u8(self.baseline_coords_type as u8);
14321        if matches!(version, MavlinkVersion::V2) {
14322            let len = __tmp.len();
14323            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14324        } else {
14325            __tmp.len()
14326        }
14327    }
14328}
14329#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14330#[doc = ""]
14331#[doc = "ID: 49"]
14332#[derive(Debug, Clone, PartialEq)]
14333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14334#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14335#[cfg_attr(feature = "ts", derive(TS))]
14336#[cfg_attr(feature = "ts", ts(export))]
14337pub struct GPS_GLOBAL_ORIGIN_DATA {
14338    #[doc = "Latitude (WGS84)"]
14339    pub latitude: i32,
14340    #[doc = "Longitude (WGS84)"]
14341    pub longitude: i32,
14342    #[doc = "Altitude (MSL). Positive for up."]
14343    pub altitude: i32,
14344    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14345    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14346    pub time_usec: u64,
14347}
14348impl GPS_GLOBAL_ORIGIN_DATA {
14349    pub const ENCODED_LEN: usize = 20usize;
14350    pub const DEFAULT: Self = Self {
14351        latitude: 0_i32,
14352        longitude: 0_i32,
14353        altitude: 0_i32,
14354        time_usec: 0_u64,
14355    };
14356    #[cfg(feature = "arbitrary")]
14357    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14358        use arbitrary::{Arbitrary, Unstructured};
14359        let mut buf = [0u8; 1024];
14360        rng.fill_bytes(&mut buf);
14361        let mut unstructured = Unstructured::new(&buf);
14362        Self::arbitrary(&mut unstructured).unwrap_or_default()
14363    }
14364}
14365impl Default for GPS_GLOBAL_ORIGIN_DATA {
14366    fn default() -> Self {
14367        Self::DEFAULT.clone()
14368    }
14369}
14370impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14371    type Message = MavMessage;
14372    const ID: u32 = 49u32;
14373    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14374    const EXTRA_CRC: u8 = 39u8;
14375    const ENCODED_LEN: usize = 20usize;
14376    fn deser(
14377        _version: MavlinkVersion,
14378        __input: &[u8],
14379    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14380        let avail_len = __input.len();
14381        let mut payload_buf = [0; Self::ENCODED_LEN];
14382        let mut buf = if avail_len < Self::ENCODED_LEN {
14383            payload_buf[0..avail_len].copy_from_slice(__input);
14384            Bytes::new(&payload_buf)
14385        } else {
14386            Bytes::new(__input)
14387        };
14388        let mut __struct = Self::default();
14389        __struct.latitude = buf.get_i32_le();
14390        __struct.longitude = buf.get_i32_le();
14391        __struct.altitude = buf.get_i32_le();
14392        __struct.time_usec = buf.get_u64_le();
14393        Ok(__struct)
14394    }
14395    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14396        let mut __tmp = BytesMut::new(bytes);
14397        #[allow(clippy::absurd_extreme_comparisons)]
14398        #[allow(unused_comparisons)]
14399        if __tmp.remaining() < Self::ENCODED_LEN {
14400            panic!(
14401                "buffer is too small (need {} bytes, but got {})",
14402                Self::ENCODED_LEN,
14403                __tmp.remaining(),
14404            )
14405        }
14406        __tmp.put_i32_le(self.latitude);
14407        __tmp.put_i32_le(self.longitude);
14408        __tmp.put_i32_le(self.altitude);
14409        if matches!(version, MavlinkVersion::V2) {
14410            __tmp.put_u64_le(self.time_usec);
14411            let len = __tmp.len();
14412            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14413        } else {
14414            __tmp.len()
14415        }
14416    }
14417}
14418#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14419#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14420#[doc = ""]
14421#[doc = "ID: 123"]
14422#[derive(Debug, Clone, PartialEq)]
14423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14424#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14425#[cfg_attr(feature = "ts", derive(TS))]
14426#[cfg_attr(feature = "ts", ts(export))]
14427pub struct GPS_INJECT_DATA_DATA {
14428    #[doc = "System ID"]
14429    pub target_system: u8,
14430    #[doc = "Component ID"]
14431    pub target_component: u8,
14432    #[doc = "Data length"]
14433    pub len: u8,
14434    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14435    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14436    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14437    pub data: [u8; 110],
14438}
14439impl GPS_INJECT_DATA_DATA {
14440    pub const ENCODED_LEN: usize = 113usize;
14441    pub const DEFAULT: Self = Self {
14442        target_system: 0_u8,
14443        target_component: 0_u8,
14444        len: 0_u8,
14445        data: [0_u8; 110usize],
14446    };
14447    #[cfg(feature = "arbitrary")]
14448    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14449        use arbitrary::{Arbitrary, Unstructured};
14450        let mut buf = [0u8; 1024];
14451        rng.fill_bytes(&mut buf);
14452        let mut unstructured = Unstructured::new(&buf);
14453        Self::arbitrary(&mut unstructured).unwrap_or_default()
14454    }
14455}
14456impl Default for GPS_INJECT_DATA_DATA {
14457    fn default() -> Self {
14458        Self::DEFAULT.clone()
14459    }
14460}
14461impl MessageData for GPS_INJECT_DATA_DATA {
14462    type Message = MavMessage;
14463    const ID: u32 = 123u32;
14464    const NAME: &'static str = "GPS_INJECT_DATA";
14465    const EXTRA_CRC: u8 = 250u8;
14466    const ENCODED_LEN: usize = 113usize;
14467    fn deser(
14468        _version: MavlinkVersion,
14469        __input: &[u8],
14470    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14471        let avail_len = __input.len();
14472        let mut payload_buf = [0; Self::ENCODED_LEN];
14473        let mut buf = if avail_len < Self::ENCODED_LEN {
14474            payload_buf[0..avail_len].copy_from_slice(__input);
14475            Bytes::new(&payload_buf)
14476        } else {
14477            Bytes::new(__input)
14478        };
14479        let mut __struct = Self::default();
14480        __struct.target_system = buf.get_u8();
14481        __struct.target_component = buf.get_u8();
14482        __struct.len = buf.get_u8();
14483        for v in &mut __struct.data {
14484            let val = buf.get_u8();
14485            *v = val;
14486        }
14487        Ok(__struct)
14488    }
14489    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14490        let mut __tmp = BytesMut::new(bytes);
14491        #[allow(clippy::absurd_extreme_comparisons)]
14492        #[allow(unused_comparisons)]
14493        if __tmp.remaining() < Self::ENCODED_LEN {
14494            panic!(
14495                "buffer is too small (need {} bytes, but got {})",
14496                Self::ENCODED_LEN,
14497                __tmp.remaining(),
14498            )
14499        }
14500        __tmp.put_u8(self.target_system);
14501        __tmp.put_u8(self.target_component);
14502        __tmp.put_u8(self.len);
14503        for val in &self.data {
14504            __tmp.put_u8(*val);
14505        }
14506        if matches!(version, MavlinkVersion::V2) {
14507            let len = __tmp.len();
14508            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14509        } else {
14510            __tmp.len()
14511        }
14512    }
14513}
14514#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14515#[doc = ""]
14516#[doc = "ID: 232"]
14517#[derive(Debug, Clone, PartialEq)]
14518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14519#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14520#[cfg_attr(feature = "ts", derive(TS))]
14521#[cfg_attr(feature = "ts", ts(export))]
14522pub struct GPS_INPUT_DATA {
14523    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14524    pub time_usec: u64,
14525    #[doc = "GPS time (from start of GPS week)"]
14526    pub time_week_ms: u32,
14527    #[doc = "Latitude (WGS84)"]
14528    pub lat: i32,
14529    #[doc = "Longitude (WGS84)"]
14530    pub lon: i32,
14531    #[doc = "Altitude (MSL). Positive for up."]
14532    pub alt: f32,
14533    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14534    pub hdop: f32,
14535    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14536    pub vdop: f32,
14537    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14538    pub vn: f32,
14539    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14540    pub ve: f32,
14541    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14542    pub vd: f32,
14543    #[doc = "GPS speed accuracy"]
14544    pub speed_accuracy: f32,
14545    #[doc = "GPS horizontal accuracy"]
14546    pub horiz_accuracy: f32,
14547    #[doc = "GPS vertical accuracy"]
14548    pub vert_accuracy: f32,
14549    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14550    pub ignore_flags: GpsInputIgnoreFlags,
14551    #[doc = "GPS week number"]
14552    pub time_week: u16,
14553    #[doc = "ID of the GPS for multiple GPS inputs"]
14554    pub gps_id: u8,
14555    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14556    pub fix_type: u8,
14557    #[doc = "Number of satellites visible."]
14558    pub satellites_visible: u8,
14559    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14560    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14561    pub yaw: u16,
14562}
14563impl GPS_INPUT_DATA {
14564    pub const ENCODED_LEN: usize = 65usize;
14565    pub const DEFAULT: Self = Self {
14566        time_usec: 0_u64,
14567        time_week_ms: 0_u32,
14568        lat: 0_i32,
14569        lon: 0_i32,
14570        alt: 0.0_f32,
14571        hdop: 0.0_f32,
14572        vdop: 0.0_f32,
14573        vn: 0.0_f32,
14574        ve: 0.0_f32,
14575        vd: 0.0_f32,
14576        speed_accuracy: 0.0_f32,
14577        horiz_accuracy: 0.0_f32,
14578        vert_accuracy: 0.0_f32,
14579        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14580        time_week: 0_u16,
14581        gps_id: 0_u8,
14582        fix_type: 0_u8,
14583        satellites_visible: 0_u8,
14584        yaw: 0_u16,
14585    };
14586    #[cfg(feature = "arbitrary")]
14587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14588        use arbitrary::{Arbitrary, Unstructured};
14589        let mut buf = [0u8; 1024];
14590        rng.fill_bytes(&mut buf);
14591        let mut unstructured = Unstructured::new(&buf);
14592        Self::arbitrary(&mut unstructured).unwrap_or_default()
14593    }
14594}
14595impl Default for GPS_INPUT_DATA {
14596    fn default() -> Self {
14597        Self::DEFAULT.clone()
14598    }
14599}
14600impl MessageData for GPS_INPUT_DATA {
14601    type Message = MavMessage;
14602    const ID: u32 = 232u32;
14603    const NAME: &'static str = "GPS_INPUT";
14604    const EXTRA_CRC: u8 = 151u8;
14605    const ENCODED_LEN: usize = 65usize;
14606    fn deser(
14607        _version: MavlinkVersion,
14608        __input: &[u8],
14609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14610        let avail_len = __input.len();
14611        let mut payload_buf = [0; Self::ENCODED_LEN];
14612        let mut buf = if avail_len < Self::ENCODED_LEN {
14613            payload_buf[0..avail_len].copy_from_slice(__input);
14614            Bytes::new(&payload_buf)
14615        } else {
14616            Bytes::new(__input)
14617        };
14618        let mut __struct = Self::default();
14619        __struct.time_usec = buf.get_u64_le();
14620        __struct.time_week_ms = buf.get_u32_le();
14621        __struct.lat = buf.get_i32_le();
14622        __struct.lon = buf.get_i32_le();
14623        __struct.alt = buf.get_f32_le();
14624        __struct.hdop = buf.get_f32_le();
14625        __struct.vdop = buf.get_f32_le();
14626        __struct.vn = buf.get_f32_le();
14627        __struct.ve = buf.get_f32_le();
14628        __struct.vd = buf.get_f32_le();
14629        __struct.speed_accuracy = buf.get_f32_le();
14630        __struct.horiz_accuracy = buf.get_f32_le();
14631        __struct.vert_accuracy = buf.get_f32_le();
14632        let tmp = buf.get_u16_le();
14633        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14634            tmp & GpsInputIgnoreFlags::all().bits(),
14635        )
14636        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14637            flag_type: "GpsInputIgnoreFlags",
14638            value: tmp as u32,
14639        })?;
14640        __struct.time_week = buf.get_u16_le();
14641        __struct.gps_id = buf.get_u8();
14642        __struct.fix_type = buf.get_u8();
14643        __struct.satellites_visible = buf.get_u8();
14644        __struct.yaw = buf.get_u16_le();
14645        Ok(__struct)
14646    }
14647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14648        let mut __tmp = BytesMut::new(bytes);
14649        #[allow(clippy::absurd_extreme_comparisons)]
14650        #[allow(unused_comparisons)]
14651        if __tmp.remaining() < Self::ENCODED_LEN {
14652            panic!(
14653                "buffer is too small (need {} bytes, but got {})",
14654                Self::ENCODED_LEN,
14655                __tmp.remaining(),
14656            )
14657        }
14658        __tmp.put_u64_le(self.time_usec);
14659        __tmp.put_u32_le(self.time_week_ms);
14660        __tmp.put_i32_le(self.lat);
14661        __tmp.put_i32_le(self.lon);
14662        __tmp.put_f32_le(self.alt);
14663        __tmp.put_f32_le(self.hdop);
14664        __tmp.put_f32_le(self.vdop);
14665        __tmp.put_f32_le(self.vn);
14666        __tmp.put_f32_le(self.ve);
14667        __tmp.put_f32_le(self.vd);
14668        __tmp.put_f32_le(self.speed_accuracy);
14669        __tmp.put_f32_le(self.horiz_accuracy);
14670        __tmp.put_f32_le(self.vert_accuracy);
14671        __tmp.put_u16_le(self.ignore_flags.bits());
14672        __tmp.put_u16_le(self.time_week);
14673        __tmp.put_u8(self.gps_id);
14674        __tmp.put_u8(self.fix_type);
14675        __tmp.put_u8(self.satellites_visible);
14676        if matches!(version, MavlinkVersion::V2) {
14677            __tmp.put_u16_le(self.yaw);
14678            let len = __tmp.len();
14679            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14680        } else {
14681            __tmp.len()
14682        }
14683    }
14684}
14685#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14686#[doc = ""]
14687#[doc = "ID: 24"]
14688#[derive(Debug, Clone, PartialEq)]
14689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14691#[cfg_attr(feature = "ts", derive(TS))]
14692#[cfg_attr(feature = "ts", ts(export))]
14693pub struct GPS_RAW_INT_DATA {
14694    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14695    pub time_usec: u64,
14696    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14697    pub lat: i32,
14698    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14699    pub lon: i32,
14700    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14701    pub alt: i32,
14702    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14703    pub eph: u16,
14704    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14705    pub epv: u16,
14706    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14707    pub vel: u16,
14708    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14709    pub cog: u16,
14710    #[doc = "GPS fix type."]
14711    pub fix_type: GpsFixType,
14712    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14713    pub satellites_visible: u8,
14714    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14715    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14716    pub alt_ellipsoid: i32,
14717    #[doc = "Position uncertainty."]
14718    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14719    pub h_acc: u32,
14720    #[doc = "Altitude uncertainty."]
14721    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14722    pub v_acc: u32,
14723    #[doc = "Speed uncertainty."]
14724    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14725    pub vel_acc: u32,
14726    #[doc = "Heading / track uncertainty"]
14727    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14728    pub hdg_acc: u32,
14729    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14730    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14731    pub yaw: u16,
14732}
14733impl GPS_RAW_INT_DATA {
14734    pub const ENCODED_LEN: usize = 52usize;
14735    pub const DEFAULT: Self = Self {
14736        time_usec: 0_u64,
14737        lat: 0_i32,
14738        lon: 0_i32,
14739        alt: 0_i32,
14740        eph: 0_u16,
14741        epv: 0_u16,
14742        vel: 0_u16,
14743        cog: 0_u16,
14744        fix_type: GpsFixType::DEFAULT,
14745        satellites_visible: 0_u8,
14746        alt_ellipsoid: 0_i32,
14747        h_acc: 0_u32,
14748        v_acc: 0_u32,
14749        vel_acc: 0_u32,
14750        hdg_acc: 0_u32,
14751        yaw: 0_u16,
14752    };
14753    #[cfg(feature = "arbitrary")]
14754    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14755        use arbitrary::{Arbitrary, Unstructured};
14756        let mut buf = [0u8; 1024];
14757        rng.fill_bytes(&mut buf);
14758        let mut unstructured = Unstructured::new(&buf);
14759        Self::arbitrary(&mut unstructured).unwrap_or_default()
14760    }
14761}
14762impl Default for GPS_RAW_INT_DATA {
14763    fn default() -> Self {
14764        Self::DEFAULT.clone()
14765    }
14766}
14767impl MessageData for GPS_RAW_INT_DATA {
14768    type Message = MavMessage;
14769    const ID: u32 = 24u32;
14770    const NAME: &'static str = "GPS_RAW_INT";
14771    const EXTRA_CRC: u8 = 24u8;
14772    const ENCODED_LEN: usize = 52usize;
14773    fn deser(
14774        _version: MavlinkVersion,
14775        __input: &[u8],
14776    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14777        let avail_len = __input.len();
14778        let mut payload_buf = [0; Self::ENCODED_LEN];
14779        let mut buf = if avail_len < Self::ENCODED_LEN {
14780            payload_buf[0..avail_len].copy_from_slice(__input);
14781            Bytes::new(&payload_buf)
14782        } else {
14783            Bytes::new(__input)
14784        };
14785        let mut __struct = Self::default();
14786        __struct.time_usec = buf.get_u64_le();
14787        __struct.lat = buf.get_i32_le();
14788        __struct.lon = buf.get_i32_le();
14789        __struct.alt = buf.get_i32_le();
14790        __struct.eph = buf.get_u16_le();
14791        __struct.epv = buf.get_u16_le();
14792        __struct.vel = buf.get_u16_le();
14793        __struct.cog = buf.get_u16_le();
14794        let tmp = buf.get_u8();
14795        __struct.fix_type =
14796            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14797                enum_type: "GpsFixType",
14798                value: tmp as u32,
14799            })?;
14800        __struct.satellites_visible = buf.get_u8();
14801        __struct.alt_ellipsoid = buf.get_i32_le();
14802        __struct.h_acc = buf.get_u32_le();
14803        __struct.v_acc = buf.get_u32_le();
14804        __struct.vel_acc = buf.get_u32_le();
14805        __struct.hdg_acc = buf.get_u32_le();
14806        __struct.yaw = buf.get_u16_le();
14807        Ok(__struct)
14808    }
14809    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14810        let mut __tmp = BytesMut::new(bytes);
14811        #[allow(clippy::absurd_extreme_comparisons)]
14812        #[allow(unused_comparisons)]
14813        if __tmp.remaining() < Self::ENCODED_LEN {
14814            panic!(
14815                "buffer is too small (need {} bytes, but got {})",
14816                Self::ENCODED_LEN,
14817                __tmp.remaining(),
14818            )
14819        }
14820        __tmp.put_u64_le(self.time_usec);
14821        __tmp.put_i32_le(self.lat);
14822        __tmp.put_i32_le(self.lon);
14823        __tmp.put_i32_le(self.alt);
14824        __tmp.put_u16_le(self.eph);
14825        __tmp.put_u16_le(self.epv);
14826        __tmp.put_u16_le(self.vel);
14827        __tmp.put_u16_le(self.cog);
14828        __tmp.put_u8(self.fix_type as u8);
14829        __tmp.put_u8(self.satellites_visible);
14830        if matches!(version, MavlinkVersion::V2) {
14831            __tmp.put_i32_le(self.alt_ellipsoid);
14832            __tmp.put_u32_le(self.h_acc);
14833            __tmp.put_u32_le(self.v_acc);
14834            __tmp.put_u32_le(self.vel_acc);
14835            __tmp.put_u32_le(self.hdg_acc);
14836            __tmp.put_u16_le(self.yaw);
14837            let len = __tmp.len();
14838            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14839        } else {
14840            __tmp.len()
14841        }
14842    }
14843}
14844#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14845#[doc = ""]
14846#[doc = "ID: 233"]
14847#[derive(Debug, Clone, PartialEq)]
14848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14850#[cfg_attr(feature = "ts", derive(TS))]
14851#[cfg_attr(feature = "ts", ts(export))]
14852pub struct GPS_RTCM_DATA_DATA {
14853    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14854    pub flags: u8,
14855    #[doc = "data length"]
14856    pub len: u8,
14857    #[doc = "RTCM message (may be fragmented)"]
14858    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14859    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14860    pub data: [u8; 180],
14861}
14862impl GPS_RTCM_DATA_DATA {
14863    pub const ENCODED_LEN: usize = 182usize;
14864    pub const DEFAULT: Self = Self {
14865        flags: 0_u8,
14866        len: 0_u8,
14867        data: [0_u8; 180usize],
14868    };
14869    #[cfg(feature = "arbitrary")]
14870    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14871        use arbitrary::{Arbitrary, Unstructured};
14872        let mut buf = [0u8; 1024];
14873        rng.fill_bytes(&mut buf);
14874        let mut unstructured = Unstructured::new(&buf);
14875        Self::arbitrary(&mut unstructured).unwrap_or_default()
14876    }
14877}
14878impl Default for GPS_RTCM_DATA_DATA {
14879    fn default() -> Self {
14880        Self::DEFAULT.clone()
14881    }
14882}
14883impl MessageData for GPS_RTCM_DATA_DATA {
14884    type Message = MavMessage;
14885    const ID: u32 = 233u32;
14886    const NAME: &'static str = "GPS_RTCM_DATA";
14887    const EXTRA_CRC: u8 = 35u8;
14888    const ENCODED_LEN: usize = 182usize;
14889    fn deser(
14890        _version: MavlinkVersion,
14891        __input: &[u8],
14892    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14893        let avail_len = __input.len();
14894        let mut payload_buf = [0; Self::ENCODED_LEN];
14895        let mut buf = if avail_len < Self::ENCODED_LEN {
14896            payload_buf[0..avail_len].copy_from_slice(__input);
14897            Bytes::new(&payload_buf)
14898        } else {
14899            Bytes::new(__input)
14900        };
14901        let mut __struct = Self::default();
14902        __struct.flags = buf.get_u8();
14903        __struct.len = buf.get_u8();
14904        for v in &mut __struct.data {
14905            let val = buf.get_u8();
14906            *v = val;
14907        }
14908        Ok(__struct)
14909    }
14910    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14911        let mut __tmp = BytesMut::new(bytes);
14912        #[allow(clippy::absurd_extreme_comparisons)]
14913        #[allow(unused_comparisons)]
14914        if __tmp.remaining() < Self::ENCODED_LEN {
14915            panic!(
14916                "buffer is too small (need {} bytes, but got {})",
14917                Self::ENCODED_LEN,
14918                __tmp.remaining(),
14919            )
14920        }
14921        __tmp.put_u8(self.flags);
14922        __tmp.put_u8(self.len);
14923        for val in &self.data {
14924            __tmp.put_u8(*val);
14925        }
14926        if matches!(version, MavlinkVersion::V2) {
14927            let len = __tmp.len();
14928            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14929        } else {
14930            __tmp.len()
14931        }
14932    }
14933}
14934#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14935#[doc = ""]
14936#[doc = "ID: 127"]
14937#[derive(Debug, Clone, PartialEq)]
14938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14940#[cfg_attr(feature = "ts", derive(TS))]
14941#[cfg_attr(feature = "ts", ts(export))]
14942pub struct GPS_RTK_DATA {
14943    #[doc = "Time since boot of last baseline message received."]
14944    pub time_last_baseline_ms: u32,
14945    #[doc = "GPS Time of Week of last baseline"]
14946    pub tow: u32,
14947    #[doc = "Current baseline in ECEF x or NED north component."]
14948    pub baseline_a_mm: i32,
14949    #[doc = "Current baseline in ECEF y or NED east component."]
14950    pub baseline_b_mm: i32,
14951    #[doc = "Current baseline in ECEF z or NED down component."]
14952    pub baseline_c_mm: i32,
14953    #[doc = "Current estimate of baseline accuracy."]
14954    pub accuracy: u32,
14955    #[doc = "Current number of integer ambiguity hypotheses."]
14956    pub iar_num_hypotheses: i32,
14957    #[doc = "GPS Week Number of last baseline"]
14958    pub wn: u16,
14959    #[doc = "Identification of connected RTK receiver."]
14960    pub rtk_receiver_id: u8,
14961    #[doc = "GPS-specific health report for RTK data."]
14962    pub rtk_health: u8,
14963    #[doc = "Rate of baseline messages being received by GPS"]
14964    pub rtk_rate: u8,
14965    #[doc = "Current number of sats used for RTK calculation."]
14966    pub nsats: u8,
14967    #[doc = "Coordinate system of baseline"]
14968    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14969}
14970impl GPS_RTK_DATA {
14971    pub const ENCODED_LEN: usize = 35usize;
14972    pub const DEFAULT: Self = Self {
14973        time_last_baseline_ms: 0_u32,
14974        tow: 0_u32,
14975        baseline_a_mm: 0_i32,
14976        baseline_b_mm: 0_i32,
14977        baseline_c_mm: 0_i32,
14978        accuracy: 0_u32,
14979        iar_num_hypotheses: 0_i32,
14980        wn: 0_u16,
14981        rtk_receiver_id: 0_u8,
14982        rtk_health: 0_u8,
14983        rtk_rate: 0_u8,
14984        nsats: 0_u8,
14985        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14986    };
14987    #[cfg(feature = "arbitrary")]
14988    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14989        use arbitrary::{Arbitrary, Unstructured};
14990        let mut buf = [0u8; 1024];
14991        rng.fill_bytes(&mut buf);
14992        let mut unstructured = Unstructured::new(&buf);
14993        Self::arbitrary(&mut unstructured).unwrap_or_default()
14994    }
14995}
14996impl Default for GPS_RTK_DATA {
14997    fn default() -> Self {
14998        Self::DEFAULT.clone()
14999    }
15000}
15001impl MessageData for GPS_RTK_DATA {
15002    type Message = MavMessage;
15003    const ID: u32 = 127u32;
15004    const NAME: &'static str = "GPS_RTK";
15005    const EXTRA_CRC: u8 = 25u8;
15006    const ENCODED_LEN: usize = 35usize;
15007    fn deser(
15008        _version: MavlinkVersion,
15009        __input: &[u8],
15010    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15011        let avail_len = __input.len();
15012        let mut payload_buf = [0; Self::ENCODED_LEN];
15013        let mut buf = if avail_len < Self::ENCODED_LEN {
15014            payload_buf[0..avail_len].copy_from_slice(__input);
15015            Bytes::new(&payload_buf)
15016        } else {
15017            Bytes::new(__input)
15018        };
15019        let mut __struct = Self::default();
15020        __struct.time_last_baseline_ms = buf.get_u32_le();
15021        __struct.tow = buf.get_u32_le();
15022        __struct.baseline_a_mm = buf.get_i32_le();
15023        __struct.baseline_b_mm = buf.get_i32_le();
15024        __struct.baseline_c_mm = buf.get_i32_le();
15025        __struct.accuracy = buf.get_u32_le();
15026        __struct.iar_num_hypotheses = buf.get_i32_le();
15027        __struct.wn = buf.get_u16_le();
15028        __struct.rtk_receiver_id = buf.get_u8();
15029        __struct.rtk_health = buf.get_u8();
15030        __struct.rtk_rate = buf.get_u8();
15031        __struct.nsats = buf.get_u8();
15032        let tmp = buf.get_u8();
15033        __struct.baseline_coords_type =
15034            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15035                enum_type: "RtkBaselineCoordinateSystem",
15036                value: tmp as u32,
15037            })?;
15038        Ok(__struct)
15039    }
15040    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15041        let mut __tmp = BytesMut::new(bytes);
15042        #[allow(clippy::absurd_extreme_comparisons)]
15043        #[allow(unused_comparisons)]
15044        if __tmp.remaining() < Self::ENCODED_LEN {
15045            panic!(
15046                "buffer is too small (need {} bytes, but got {})",
15047                Self::ENCODED_LEN,
15048                __tmp.remaining(),
15049            )
15050        }
15051        __tmp.put_u32_le(self.time_last_baseline_ms);
15052        __tmp.put_u32_le(self.tow);
15053        __tmp.put_i32_le(self.baseline_a_mm);
15054        __tmp.put_i32_le(self.baseline_b_mm);
15055        __tmp.put_i32_le(self.baseline_c_mm);
15056        __tmp.put_u32_le(self.accuracy);
15057        __tmp.put_i32_le(self.iar_num_hypotheses);
15058        __tmp.put_u16_le(self.wn);
15059        __tmp.put_u8(self.rtk_receiver_id);
15060        __tmp.put_u8(self.rtk_health);
15061        __tmp.put_u8(self.rtk_rate);
15062        __tmp.put_u8(self.nsats);
15063        __tmp.put_u8(self.baseline_coords_type as u8);
15064        if matches!(version, MavlinkVersion::V2) {
15065            let len = __tmp.len();
15066            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15067        } else {
15068            __tmp.len()
15069        }
15070    }
15071}
15072#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15073#[doc = ""]
15074#[doc = "ID: 25"]
15075#[derive(Debug, Clone, PartialEq)]
15076#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15077#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15078#[cfg_attr(feature = "ts", derive(TS))]
15079#[cfg_attr(feature = "ts", ts(export))]
15080pub struct GPS_STATUS_DATA {
15081    #[doc = "Number of satellites visible"]
15082    pub satellites_visible: u8,
15083    #[doc = "Global satellite ID"]
15084    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15085    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15086    pub satellite_prn: [u8; 20],
15087    #[doc = "0: Satellite not used, 1: used for localization"]
15088    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15089    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15090    pub satellite_used: [u8; 20],
15091    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15092    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15093    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15094    pub satellite_elevation: [u8; 20],
15095    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15096    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15097    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15098    pub satellite_azimuth: [u8; 20],
15099    #[doc = "Signal to noise ratio of satellite"]
15100    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15101    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15102    pub satellite_snr: [u8; 20],
15103}
15104impl GPS_STATUS_DATA {
15105    pub const ENCODED_LEN: usize = 101usize;
15106    pub const DEFAULT: Self = Self {
15107        satellites_visible: 0_u8,
15108        satellite_prn: [0_u8; 20usize],
15109        satellite_used: [0_u8; 20usize],
15110        satellite_elevation: [0_u8; 20usize],
15111        satellite_azimuth: [0_u8; 20usize],
15112        satellite_snr: [0_u8; 20usize],
15113    };
15114    #[cfg(feature = "arbitrary")]
15115    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15116        use arbitrary::{Arbitrary, Unstructured};
15117        let mut buf = [0u8; 1024];
15118        rng.fill_bytes(&mut buf);
15119        let mut unstructured = Unstructured::new(&buf);
15120        Self::arbitrary(&mut unstructured).unwrap_or_default()
15121    }
15122}
15123impl Default for GPS_STATUS_DATA {
15124    fn default() -> Self {
15125        Self::DEFAULT.clone()
15126    }
15127}
15128impl MessageData for GPS_STATUS_DATA {
15129    type Message = MavMessage;
15130    const ID: u32 = 25u32;
15131    const NAME: &'static str = "GPS_STATUS";
15132    const EXTRA_CRC: u8 = 23u8;
15133    const ENCODED_LEN: usize = 101usize;
15134    fn deser(
15135        _version: MavlinkVersion,
15136        __input: &[u8],
15137    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15138        let avail_len = __input.len();
15139        let mut payload_buf = [0; Self::ENCODED_LEN];
15140        let mut buf = if avail_len < Self::ENCODED_LEN {
15141            payload_buf[0..avail_len].copy_from_slice(__input);
15142            Bytes::new(&payload_buf)
15143        } else {
15144            Bytes::new(__input)
15145        };
15146        let mut __struct = Self::default();
15147        __struct.satellites_visible = buf.get_u8();
15148        for v in &mut __struct.satellite_prn {
15149            let val = buf.get_u8();
15150            *v = val;
15151        }
15152        for v in &mut __struct.satellite_used {
15153            let val = buf.get_u8();
15154            *v = val;
15155        }
15156        for v in &mut __struct.satellite_elevation {
15157            let val = buf.get_u8();
15158            *v = val;
15159        }
15160        for v in &mut __struct.satellite_azimuth {
15161            let val = buf.get_u8();
15162            *v = val;
15163        }
15164        for v in &mut __struct.satellite_snr {
15165            let val = buf.get_u8();
15166            *v = val;
15167        }
15168        Ok(__struct)
15169    }
15170    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15171        let mut __tmp = BytesMut::new(bytes);
15172        #[allow(clippy::absurd_extreme_comparisons)]
15173        #[allow(unused_comparisons)]
15174        if __tmp.remaining() < Self::ENCODED_LEN {
15175            panic!(
15176                "buffer is too small (need {} bytes, but got {})",
15177                Self::ENCODED_LEN,
15178                __tmp.remaining(),
15179            )
15180        }
15181        __tmp.put_u8(self.satellites_visible);
15182        for val in &self.satellite_prn {
15183            __tmp.put_u8(*val);
15184        }
15185        for val in &self.satellite_used {
15186            __tmp.put_u8(*val);
15187        }
15188        for val in &self.satellite_elevation {
15189            __tmp.put_u8(*val);
15190        }
15191        for val in &self.satellite_azimuth {
15192            __tmp.put_u8(*val);
15193        }
15194        for val in &self.satellite_snr {
15195            __tmp.put_u8(*val);
15196        }
15197        if matches!(version, MavlinkVersion::V2) {
15198            let len = __tmp.len();
15199            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15200        } else {
15201            __tmp.len()
15202        }
15203    }
15204}
15205#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15206#[doc = ""]
15207#[doc = "ID: 0"]
15208#[derive(Debug, Clone, PartialEq)]
15209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15211#[cfg_attr(feature = "ts", derive(TS))]
15212#[cfg_attr(feature = "ts", ts(export))]
15213pub struct HEARTBEAT_DATA {
15214    #[doc = "A bitfield for use for autopilot-specific flags"]
15215    pub custom_mode: u32,
15216    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15217    pub mavtype: MavType,
15218    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15219    pub autopilot: MavAutopilot,
15220    #[doc = "System mode bitmap."]
15221    pub base_mode: MavModeFlag,
15222    #[doc = "System status flag."]
15223    pub system_status: MavState,
15224    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15225    pub mavlink_version: u8,
15226}
15227impl HEARTBEAT_DATA {
15228    pub const ENCODED_LEN: usize = 9usize;
15229    pub const DEFAULT: Self = Self {
15230        custom_mode: 0_u32,
15231        mavtype: MavType::DEFAULT,
15232        autopilot: MavAutopilot::DEFAULT,
15233        base_mode: MavModeFlag::DEFAULT,
15234        system_status: MavState::DEFAULT,
15235        mavlink_version: MINOR_MAVLINK_VERSION,
15236    };
15237    #[cfg(feature = "arbitrary")]
15238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15239        use arbitrary::{Arbitrary, Unstructured};
15240        let mut buf = [0u8; 1024];
15241        rng.fill_bytes(&mut buf);
15242        let mut unstructured = Unstructured::new(&buf);
15243        Self::arbitrary(&mut unstructured).unwrap_or_default()
15244    }
15245}
15246impl Default for HEARTBEAT_DATA {
15247    fn default() -> Self {
15248        Self::DEFAULT.clone()
15249    }
15250}
15251impl MessageData for HEARTBEAT_DATA {
15252    type Message = MavMessage;
15253    const ID: u32 = 0u32;
15254    const NAME: &'static str = "HEARTBEAT";
15255    const EXTRA_CRC: u8 = 50u8;
15256    const ENCODED_LEN: usize = 9usize;
15257    fn deser(
15258        _version: MavlinkVersion,
15259        __input: &[u8],
15260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15261        let avail_len = __input.len();
15262        let mut payload_buf = [0; Self::ENCODED_LEN];
15263        let mut buf = if avail_len < Self::ENCODED_LEN {
15264            payload_buf[0..avail_len].copy_from_slice(__input);
15265            Bytes::new(&payload_buf)
15266        } else {
15267            Bytes::new(__input)
15268        };
15269        let mut __struct = Self::default();
15270        __struct.custom_mode = buf.get_u32_le();
15271        let tmp = buf.get_u8();
15272        __struct.mavtype =
15273            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15274                enum_type: "MavType",
15275                value: tmp as u32,
15276            })?;
15277        let tmp = buf.get_u8();
15278        __struct.autopilot =
15279            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15280                enum_type: "MavAutopilot",
15281                value: tmp as u32,
15282            })?;
15283        let tmp = buf.get_u8();
15284        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15285            ::mavlink_core::error::ParserError::InvalidFlag {
15286                flag_type: "MavModeFlag",
15287                value: tmp as u32,
15288            },
15289        )?;
15290        let tmp = buf.get_u8();
15291        __struct.system_status =
15292            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15293                enum_type: "MavState",
15294                value: tmp as u32,
15295            })?;
15296        __struct.mavlink_version = buf.get_u8();
15297        Ok(__struct)
15298    }
15299    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15300        let mut __tmp = BytesMut::new(bytes);
15301        #[allow(clippy::absurd_extreme_comparisons)]
15302        #[allow(unused_comparisons)]
15303        if __tmp.remaining() < Self::ENCODED_LEN {
15304            panic!(
15305                "buffer is too small (need {} bytes, but got {})",
15306                Self::ENCODED_LEN,
15307                __tmp.remaining(),
15308            )
15309        }
15310        __tmp.put_u32_le(self.custom_mode);
15311        __tmp.put_u8(self.mavtype as u8);
15312        __tmp.put_u8(self.autopilot as u8);
15313        __tmp.put_u8(self.base_mode.bits());
15314        __tmp.put_u8(self.system_status as u8);
15315        __tmp.put_u8(self.mavlink_version);
15316        if matches!(version, MavlinkVersion::V2) {
15317            let len = __tmp.len();
15318            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15319        } else {
15320            __tmp.len()
15321        }
15322    }
15323}
15324#[doc = "Herelink Telemetry."]
15325#[doc = ""]
15326#[doc = "ID: 50003"]
15327#[derive(Debug, Clone, PartialEq)]
15328#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15330#[cfg_attr(feature = "ts", derive(TS))]
15331#[cfg_attr(feature = "ts", ts(export))]
15332pub struct HERELINK_TELEM_DATA {
15333    pub rf_freq: u32,
15334    pub link_bw: u32,
15335    pub link_rate: u32,
15336    pub snr: i16,
15337    pub cpu_temp: i16,
15338    pub board_temp: i16,
15339    pub rssi: u8,
15340}
15341impl HERELINK_TELEM_DATA {
15342    pub const ENCODED_LEN: usize = 19usize;
15343    pub const DEFAULT: Self = Self {
15344        rf_freq: 0_u32,
15345        link_bw: 0_u32,
15346        link_rate: 0_u32,
15347        snr: 0_i16,
15348        cpu_temp: 0_i16,
15349        board_temp: 0_i16,
15350        rssi: 0_u8,
15351    };
15352    #[cfg(feature = "arbitrary")]
15353    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15354        use arbitrary::{Arbitrary, Unstructured};
15355        let mut buf = [0u8; 1024];
15356        rng.fill_bytes(&mut buf);
15357        let mut unstructured = Unstructured::new(&buf);
15358        Self::arbitrary(&mut unstructured).unwrap_or_default()
15359    }
15360}
15361impl Default for HERELINK_TELEM_DATA {
15362    fn default() -> Self {
15363        Self::DEFAULT.clone()
15364    }
15365}
15366impl MessageData for HERELINK_TELEM_DATA {
15367    type Message = MavMessage;
15368    const ID: u32 = 50003u32;
15369    const NAME: &'static str = "HERELINK_TELEM";
15370    const EXTRA_CRC: u8 = 62u8;
15371    const ENCODED_LEN: usize = 19usize;
15372    fn deser(
15373        _version: MavlinkVersion,
15374        __input: &[u8],
15375    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15376        let avail_len = __input.len();
15377        let mut payload_buf = [0; Self::ENCODED_LEN];
15378        let mut buf = if avail_len < Self::ENCODED_LEN {
15379            payload_buf[0..avail_len].copy_from_slice(__input);
15380            Bytes::new(&payload_buf)
15381        } else {
15382            Bytes::new(__input)
15383        };
15384        let mut __struct = Self::default();
15385        __struct.rf_freq = buf.get_u32_le();
15386        __struct.link_bw = buf.get_u32_le();
15387        __struct.link_rate = buf.get_u32_le();
15388        __struct.snr = buf.get_i16_le();
15389        __struct.cpu_temp = buf.get_i16_le();
15390        __struct.board_temp = buf.get_i16_le();
15391        __struct.rssi = buf.get_u8();
15392        Ok(__struct)
15393    }
15394    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15395        let mut __tmp = BytesMut::new(bytes);
15396        #[allow(clippy::absurd_extreme_comparisons)]
15397        #[allow(unused_comparisons)]
15398        if __tmp.remaining() < Self::ENCODED_LEN {
15399            panic!(
15400                "buffer is too small (need {} bytes, but got {})",
15401                Self::ENCODED_LEN,
15402                __tmp.remaining(),
15403            )
15404        }
15405        __tmp.put_u32_le(self.rf_freq);
15406        __tmp.put_u32_le(self.link_bw);
15407        __tmp.put_u32_le(self.link_rate);
15408        __tmp.put_i16_le(self.snr);
15409        __tmp.put_i16_le(self.cpu_temp);
15410        __tmp.put_i16_le(self.board_temp);
15411        __tmp.put_u8(self.rssi);
15412        if matches!(version, MavlinkVersion::V2) {
15413            let len = __tmp.len();
15414            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15415        } else {
15416            __tmp.len()
15417        }
15418    }
15419}
15420#[doc = "Information about video stream."]
15421#[doc = ""]
15422#[doc = "ID: 50002"]
15423#[derive(Debug, Clone, PartialEq)]
15424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15426#[cfg_attr(feature = "ts", derive(TS))]
15427#[cfg_attr(feature = "ts", ts(export))]
15428pub struct HERELINK_VIDEO_STREAM_INFORMATION_DATA {
15429    #[doc = "Frame rate."]
15430    pub framerate: f32,
15431    #[doc = "Bit rate."]
15432    pub bitrate: u32,
15433    #[doc = "Horizontal resolution."]
15434    pub resolution_h: u16,
15435    #[doc = "Vertical resolution."]
15436    pub resolution_v: u16,
15437    #[doc = "Video image rotation clockwise."]
15438    pub rotation: u16,
15439    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
15440    pub camera_id: u8,
15441    #[doc = "Number of streams available."]
15442    pub status: u8,
15443    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
15444    #[cfg_attr(
15445        feature = "serde",
15446        serde(
15447            serialize_with = "crate::nulstr::serialize::<_, 230>",
15448            deserialize_with = "crate::nulstr::deserialize::<_, 230>"
15449        )
15450    )]
15451    #[cfg_attr(feature = "ts", ts(type = "string"))]
15452    pub uri: [u8; 230],
15453}
15454impl HERELINK_VIDEO_STREAM_INFORMATION_DATA {
15455    pub const ENCODED_LEN: usize = 246usize;
15456    pub const DEFAULT: Self = Self {
15457        framerate: 0.0_f32,
15458        bitrate: 0_u32,
15459        resolution_h: 0_u16,
15460        resolution_v: 0_u16,
15461        rotation: 0_u16,
15462        camera_id: 0_u8,
15463        status: 0_u8,
15464        uri: [0_u8; 230usize],
15465    };
15466    #[cfg(feature = "arbitrary")]
15467    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15468        use arbitrary::{Arbitrary, Unstructured};
15469        let mut buf = [0u8; 1024];
15470        rng.fill_bytes(&mut buf);
15471        let mut unstructured = Unstructured::new(&buf);
15472        Self::arbitrary(&mut unstructured).unwrap_or_default()
15473    }
15474}
15475impl Default for HERELINK_VIDEO_STREAM_INFORMATION_DATA {
15476    fn default() -> Self {
15477        Self::DEFAULT.clone()
15478    }
15479}
15480impl MessageData for HERELINK_VIDEO_STREAM_INFORMATION_DATA {
15481    type Message = MavMessage;
15482    const ID: u32 = 50002u32;
15483    const NAME: &'static str = "HERELINK_VIDEO_STREAM_INFORMATION";
15484    const EXTRA_CRC: u8 = 181u8;
15485    const ENCODED_LEN: usize = 246usize;
15486    fn deser(
15487        _version: MavlinkVersion,
15488        __input: &[u8],
15489    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15490        let avail_len = __input.len();
15491        let mut payload_buf = [0; Self::ENCODED_LEN];
15492        let mut buf = if avail_len < Self::ENCODED_LEN {
15493            payload_buf[0..avail_len].copy_from_slice(__input);
15494            Bytes::new(&payload_buf)
15495        } else {
15496            Bytes::new(__input)
15497        };
15498        let mut __struct = Self::default();
15499        __struct.framerate = buf.get_f32_le();
15500        __struct.bitrate = buf.get_u32_le();
15501        __struct.resolution_h = buf.get_u16_le();
15502        __struct.resolution_v = buf.get_u16_le();
15503        __struct.rotation = buf.get_u16_le();
15504        __struct.camera_id = buf.get_u8();
15505        __struct.status = buf.get_u8();
15506        for v in &mut __struct.uri {
15507            let val = buf.get_u8();
15508            *v = val;
15509        }
15510        Ok(__struct)
15511    }
15512    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15513        let mut __tmp = BytesMut::new(bytes);
15514        #[allow(clippy::absurd_extreme_comparisons)]
15515        #[allow(unused_comparisons)]
15516        if __tmp.remaining() < Self::ENCODED_LEN {
15517            panic!(
15518                "buffer is too small (need {} bytes, but got {})",
15519                Self::ENCODED_LEN,
15520                __tmp.remaining(),
15521            )
15522        }
15523        __tmp.put_f32_le(self.framerate);
15524        __tmp.put_u32_le(self.bitrate);
15525        __tmp.put_u16_le(self.resolution_h);
15526        __tmp.put_u16_le(self.resolution_v);
15527        __tmp.put_u16_le(self.rotation);
15528        __tmp.put_u8(self.camera_id);
15529        __tmp.put_u8(self.status);
15530        for val in &self.uri {
15531            __tmp.put_u8(*val);
15532        }
15533        if matches!(version, MavlinkVersion::V2) {
15534            let len = __tmp.len();
15535            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15536        } else {
15537            __tmp.len()
15538        }
15539    }
15540}
15541#[doc = "The IMU readings in SI units in NED body frame."]
15542#[doc = ""]
15543#[doc = "ID: 105"]
15544#[derive(Debug, Clone, PartialEq)]
15545#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15547#[cfg_attr(feature = "ts", derive(TS))]
15548#[cfg_attr(feature = "ts", ts(export))]
15549pub struct HIGHRES_IMU_DATA {
15550    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15551    pub time_usec: u64,
15552    #[doc = "X acceleration"]
15553    pub xacc: f32,
15554    #[doc = "Y acceleration"]
15555    pub yacc: f32,
15556    #[doc = "Z acceleration"]
15557    pub zacc: f32,
15558    #[doc = "Angular speed around X axis"]
15559    pub xgyro: f32,
15560    #[doc = "Angular speed around Y axis"]
15561    pub ygyro: f32,
15562    #[doc = "Angular speed around Z axis"]
15563    pub zgyro: f32,
15564    #[doc = "X Magnetic field"]
15565    pub xmag: f32,
15566    #[doc = "Y Magnetic field"]
15567    pub ymag: f32,
15568    #[doc = "Z Magnetic field"]
15569    pub zmag: f32,
15570    #[doc = "Absolute pressure"]
15571    pub abs_pressure: f32,
15572    #[doc = "Differential pressure"]
15573    pub diff_pressure: f32,
15574    #[doc = "Altitude calculated from pressure"]
15575    pub pressure_alt: f32,
15576    #[doc = "Temperature"]
15577    pub temperature: f32,
15578    #[doc = "Bitmap for fields that have updated since last message"]
15579    pub fields_updated: HighresImuUpdatedFlags,
15580    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15581    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15582    pub id: u8,
15583}
15584impl HIGHRES_IMU_DATA {
15585    pub const ENCODED_LEN: usize = 63usize;
15586    pub const DEFAULT: Self = Self {
15587        time_usec: 0_u64,
15588        xacc: 0.0_f32,
15589        yacc: 0.0_f32,
15590        zacc: 0.0_f32,
15591        xgyro: 0.0_f32,
15592        ygyro: 0.0_f32,
15593        zgyro: 0.0_f32,
15594        xmag: 0.0_f32,
15595        ymag: 0.0_f32,
15596        zmag: 0.0_f32,
15597        abs_pressure: 0.0_f32,
15598        diff_pressure: 0.0_f32,
15599        pressure_alt: 0.0_f32,
15600        temperature: 0.0_f32,
15601        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15602        id: 0_u8,
15603    };
15604    #[cfg(feature = "arbitrary")]
15605    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15606        use arbitrary::{Arbitrary, Unstructured};
15607        let mut buf = [0u8; 1024];
15608        rng.fill_bytes(&mut buf);
15609        let mut unstructured = Unstructured::new(&buf);
15610        Self::arbitrary(&mut unstructured).unwrap_or_default()
15611    }
15612}
15613impl Default for HIGHRES_IMU_DATA {
15614    fn default() -> Self {
15615        Self::DEFAULT.clone()
15616    }
15617}
15618impl MessageData for HIGHRES_IMU_DATA {
15619    type Message = MavMessage;
15620    const ID: u32 = 105u32;
15621    const NAME: &'static str = "HIGHRES_IMU";
15622    const EXTRA_CRC: u8 = 93u8;
15623    const ENCODED_LEN: usize = 63usize;
15624    fn deser(
15625        _version: MavlinkVersion,
15626        __input: &[u8],
15627    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15628        let avail_len = __input.len();
15629        let mut payload_buf = [0; Self::ENCODED_LEN];
15630        let mut buf = if avail_len < Self::ENCODED_LEN {
15631            payload_buf[0..avail_len].copy_from_slice(__input);
15632            Bytes::new(&payload_buf)
15633        } else {
15634            Bytes::new(__input)
15635        };
15636        let mut __struct = Self::default();
15637        __struct.time_usec = buf.get_u64_le();
15638        __struct.xacc = buf.get_f32_le();
15639        __struct.yacc = buf.get_f32_le();
15640        __struct.zacc = buf.get_f32_le();
15641        __struct.xgyro = buf.get_f32_le();
15642        __struct.ygyro = buf.get_f32_le();
15643        __struct.zgyro = buf.get_f32_le();
15644        __struct.xmag = buf.get_f32_le();
15645        __struct.ymag = buf.get_f32_le();
15646        __struct.zmag = buf.get_f32_le();
15647        __struct.abs_pressure = buf.get_f32_le();
15648        __struct.diff_pressure = buf.get_f32_le();
15649        __struct.pressure_alt = buf.get_f32_le();
15650        __struct.temperature = buf.get_f32_le();
15651        let tmp = buf.get_u16_le();
15652        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
15653            tmp & HighresImuUpdatedFlags::all().bits(),
15654        )
15655        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15656            flag_type: "HighresImuUpdatedFlags",
15657            value: tmp as u32,
15658        })?;
15659        __struct.id = buf.get_u8();
15660        Ok(__struct)
15661    }
15662    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15663        let mut __tmp = BytesMut::new(bytes);
15664        #[allow(clippy::absurd_extreme_comparisons)]
15665        #[allow(unused_comparisons)]
15666        if __tmp.remaining() < Self::ENCODED_LEN {
15667            panic!(
15668                "buffer is too small (need {} bytes, but got {})",
15669                Self::ENCODED_LEN,
15670                __tmp.remaining(),
15671            )
15672        }
15673        __tmp.put_u64_le(self.time_usec);
15674        __tmp.put_f32_le(self.xacc);
15675        __tmp.put_f32_le(self.yacc);
15676        __tmp.put_f32_le(self.zacc);
15677        __tmp.put_f32_le(self.xgyro);
15678        __tmp.put_f32_le(self.ygyro);
15679        __tmp.put_f32_le(self.zgyro);
15680        __tmp.put_f32_le(self.xmag);
15681        __tmp.put_f32_le(self.ymag);
15682        __tmp.put_f32_le(self.zmag);
15683        __tmp.put_f32_le(self.abs_pressure);
15684        __tmp.put_f32_le(self.diff_pressure);
15685        __tmp.put_f32_le(self.pressure_alt);
15686        __tmp.put_f32_le(self.temperature);
15687        __tmp.put_u16_le(self.fields_updated.bits());
15688        if matches!(version, MavlinkVersion::V2) {
15689            __tmp.put_u8(self.id);
15690            let len = __tmp.len();
15691            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15692        } else {
15693            __tmp.len()
15694        }
15695    }
15696}
15697#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15698#[doc = "Message appropriate for high latency connections like Iridium."]
15699#[doc = ""]
15700#[doc = "ID: 234"]
15701#[derive(Debug, Clone, PartialEq)]
15702#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15704#[cfg_attr(feature = "ts", derive(TS))]
15705#[cfg_attr(feature = "ts", ts(export))]
15706pub struct HIGH_LATENCY_DATA {
15707    #[doc = "A bitfield for use for autopilot-specific flags."]
15708    pub custom_mode: u32,
15709    #[doc = "Latitude"]
15710    pub latitude: i32,
15711    #[doc = "Longitude"]
15712    pub longitude: i32,
15713    #[doc = "roll"]
15714    pub roll: i16,
15715    #[doc = "pitch"]
15716    pub pitch: i16,
15717    #[doc = "heading"]
15718    pub heading: u16,
15719    #[doc = "heading setpoint"]
15720    pub heading_sp: i16,
15721    #[doc = "Altitude above mean sea level"]
15722    pub altitude_amsl: i16,
15723    #[doc = "Altitude setpoint relative to the home position"]
15724    pub altitude_sp: i16,
15725    #[doc = "distance to target"]
15726    pub wp_distance: u16,
15727    #[doc = "Bitmap of enabled system modes."]
15728    pub base_mode: MavModeFlag,
15729    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15730    pub landed_state: MavLandedState,
15731    #[doc = "throttle (percentage)"]
15732    pub throttle: i8,
15733    #[doc = "airspeed"]
15734    pub airspeed: u8,
15735    #[doc = "airspeed setpoint"]
15736    pub airspeed_sp: u8,
15737    #[doc = "groundspeed"]
15738    pub groundspeed: u8,
15739    #[doc = "climb rate"]
15740    pub climb_rate: i8,
15741    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15742    pub gps_nsat: u8,
15743    #[doc = "GPS Fix type."]
15744    pub gps_fix_type: GpsFixType,
15745    #[doc = "Remaining battery (percentage)"]
15746    pub battery_remaining: u8,
15747    #[doc = "Autopilot temperature (degrees C)"]
15748    pub temperature: i8,
15749    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15750    pub temperature_air: i8,
15751    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15752    pub failsafe: u8,
15753    #[doc = "current waypoint number"]
15754    pub wp_num: u8,
15755}
15756impl HIGH_LATENCY_DATA {
15757    pub const ENCODED_LEN: usize = 40usize;
15758    pub const DEFAULT: Self = Self {
15759        custom_mode: 0_u32,
15760        latitude: 0_i32,
15761        longitude: 0_i32,
15762        roll: 0_i16,
15763        pitch: 0_i16,
15764        heading: 0_u16,
15765        heading_sp: 0_i16,
15766        altitude_amsl: 0_i16,
15767        altitude_sp: 0_i16,
15768        wp_distance: 0_u16,
15769        base_mode: MavModeFlag::DEFAULT,
15770        landed_state: MavLandedState::DEFAULT,
15771        throttle: 0_i8,
15772        airspeed: 0_u8,
15773        airspeed_sp: 0_u8,
15774        groundspeed: 0_u8,
15775        climb_rate: 0_i8,
15776        gps_nsat: 0_u8,
15777        gps_fix_type: GpsFixType::DEFAULT,
15778        battery_remaining: 0_u8,
15779        temperature: 0_i8,
15780        temperature_air: 0_i8,
15781        failsafe: 0_u8,
15782        wp_num: 0_u8,
15783    };
15784    #[cfg(feature = "arbitrary")]
15785    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15786        use arbitrary::{Arbitrary, Unstructured};
15787        let mut buf = [0u8; 1024];
15788        rng.fill_bytes(&mut buf);
15789        let mut unstructured = Unstructured::new(&buf);
15790        Self::arbitrary(&mut unstructured).unwrap_or_default()
15791    }
15792}
15793impl Default for HIGH_LATENCY_DATA {
15794    fn default() -> Self {
15795        Self::DEFAULT.clone()
15796    }
15797}
15798impl MessageData for HIGH_LATENCY_DATA {
15799    type Message = MavMessage;
15800    const ID: u32 = 234u32;
15801    const NAME: &'static str = "HIGH_LATENCY";
15802    const EXTRA_CRC: u8 = 150u8;
15803    const ENCODED_LEN: usize = 40usize;
15804    fn deser(
15805        _version: MavlinkVersion,
15806        __input: &[u8],
15807    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15808        let avail_len = __input.len();
15809        let mut payload_buf = [0; Self::ENCODED_LEN];
15810        let mut buf = if avail_len < Self::ENCODED_LEN {
15811            payload_buf[0..avail_len].copy_from_slice(__input);
15812            Bytes::new(&payload_buf)
15813        } else {
15814            Bytes::new(__input)
15815        };
15816        let mut __struct = Self::default();
15817        __struct.custom_mode = buf.get_u32_le();
15818        __struct.latitude = buf.get_i32_le();
15819        __struct.longitude = buf.get_i32_le();
15820        __struct.roll = buf.get_i16_le();
15821        __struct.pitch = buf.get_i16_le();
15822        __struct.heading = buf.get_u16_le();
15823        __struct.heading_sp = buf.get_i16_le();
15824        __struct.altitude_amsl = buf.get_i16_le();
15825        __struct.altitude_sp = buf.get_i16_le();
15826        __struct.wp_distance = buf.get_u16_le();
15827        let tmp = buf.get_u8();
15828        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15829            ::mavlink_core::error::ParserError::InvalidFlag {
15830                flag_type: "MavModeFlag",
15831                value: tmp as u32,
15832            },
15833        )?;
15834        let tmp = buf.get_u8();
15835        __struct.landed_state =
15836            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15837                enum_type: "MavLandedState",
15838                value: tmp as u32,
15839            })?;
15840        __struct.throttle = buf.get_i8();
15841        __struct.airspeed = buf.get_u8();
15842        __struct.airspeed_sp = buf.get_u8();
15843        __struct.groundspeed = buf.get_u8();
15844        __struct.climb_rate = buf.get_i8();
15845        __struct.gps_nsat = buf.get_u8();
15846        let tmp = buf.get_u8();
15847        __struct.gps_fix_type =
15848            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15849                enum_type: "GpsFixType",
15850                value: tmp as u32,
15851            })?;
15852        __struct.battery_remaining = buf.get_u8();
15853        __struct.temperature = buf.get_i8();
15854        __struct.temperature_air = buf.get_i8();
15855        __struct.failsafe = buf.get_u8();
15856        __struct.wp_num = buf.get_u8();
15857        Ok(__struct)
15858    }
15859    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15860        let mut __tmp = BytesMut::new(bytes);
15861        #[allow(clippy::absurd_extreme_comparisons)]
15862        #[allow(unused_comparisons)]
15863        if __tmp.remaining() < Self::ENCODED_LEN {
15864            panic!(
15865                "buffer is too small (need {} bytes, but got {})",
15866                Self::ENCODED_LEN,
15867                __tmp.remaining(),
15868            )
15869        }
15870        __tmp.put_u32_le(self.custom_mode);
15871        __tmp.put_i32_le(self.latitude);
15872        __tmp.put_i32_le(self.longitude);
15873        __tmp.put_i16_le(self.roll);
15874        __tmp.put_i16_le(self.pitch);
15875        __tmp.put_u16_le(self.heading);
15876        __tmp.put_i16_le(self.heading_sp);
15877        __tmp.put_i16_le(self.altitude_amsl);
15878        __tmp.put_i16_le(self.altitude_sp);
15879        __tmp.put_u16_le(self.wp_distance);
15880        __tmp.put_u8(self.base_mode.bits());
15881        __tmp.put_u8(self.landed_state as u8);
15882        __tmp.put_i8(self.throttle);
15883        __tmp.put_u8(self.airspeed);
15884        __tmp.put_u8(self.airspeed_sp);
15885        __tmp.put_u8(self.groundspeed);
15886        __tmp.put_i8(self.climb_rate);
15887        __tmp.put_u8(self.gps_nsat);
15888        __tmp.put_u8(self.gps_fix_type as u8);
15889        __tmp.put_u8(self.battery_remaining);
15890        __tmp.put_i8(self.temperature);
15891        __tmp.put_i8(self.temperature_air);
15892        __tmp.put_u8(self.failsafe);
15893        __tmp.put_u8(self.wp_num);
15894        if matches!(version, MavlinkVersion::V2) {
15895            let len = __tmp.len();
15896            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15897        } else {
15898            __tmp.len()
15899        }
15900    }
15901}
15902#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15903#[doc = ""]
15904#[doc = "ID: 235"]
15905#[derive(Debug, Clone, PartialEq)]
15906#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15907#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15908#[cfg_attr(feature = "ts", derive(TS))]
15909#[cfg_attr(feature = "ts", ts(export))]
15910pub struct HIGH_LATENCY2_DATA {
15911    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15912    pub timestamp: u32,
15913    #[doc = "Latitude"]
15914    pub latitude: i32,
15915    #[doc = "Longitude"]
15916    pub longitude: i32,
15917    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15918    pub custom_mode: u16,
15919    #[doc = "Altitude above mean sea level"]
15920    pub altitude: i16,
15921    #[doc = "Altitude setpoint"]
15922    pub target_altitude: i16,
15923    #[doc = "Distance to target waypoint or position"]
15924    pub target_distance: u16,
15925    #[doc = "Current waypoint number"]
15926    pub wp_num: u16,
15927    #[doc = "Bitmap of failure flags."]
15928    pub failure_flags: HlFailureFlag,
15929    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15930    pub mavtype: MavType,
15931    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15932    pub autopilot: MavAutopilot,
15933    #[doc = "Heading"]
15934    pub heading: u8,
15935    #[doc = "Heading setpoint"]
15936    pub target_heading: u8,
15937    #[doc = "Throttle"]
15938    pub throttle: u8,
15939    #[doc = "Airspeed"]
15940    pub airspeed: u8,
15941    #[doc = "Airspeed setpoint"]
15942    pub airspeed_sp: u8,
15943    #[doc = "Groundspeed"]
15944    pub groundspeed: u8,
15945    #[doc = "Windspeed"]
15946    pub windspeed: u8,
15947    #[doc = "Wind heading"]
15948    pub wind_heading: u8,
15949    #[doc = "Maximum error horizontal position since last message"]
15950    pub eph: u8,
15951    #[doc = "Maximum error vertical position since last message"]
15952    pub epv: u8,
15953    #[doc = "Air temperature"]
15954    pub temperature_air: i8,
15955    #[doc = "Maximum climb rate magnitude since last message"]
15956    pub climb_rate: i8,
15957    #[doc = "Battery level (-1 if field not provided)."]
15958    pub battery: i8,
15959    #[doc = "Field for custom payload."]
15960    pub custom0: i8,
15961    #[doc = "Field for custom payload."]
15962    pub custom1: i8,
15963    #[doc = "Field for custom payload."]
15964    pub custom2: i8,
15965}
15966impl HIGH_LATENCY2_DATA {
15967    pub const ENCODED_LEN: usize = 42usize;
15968    pub const DEFAULT: Self = Self {
15969        timestamp: 0_u32,
15970        latitude: 0_i32,
15971        longitude: 0_i32,
15972        custom_mode: 0_u16,
15973        altitude: 0_i16,
15974        target_altitude: 0_i16,
15975        target_distance: 0_u16,
15976        wp_num: 0_u16,
15977        failure_flags: HlFailureFlag::DEFAULT,
15978        mavtype: MavType::DEFAULT,
15979        autopilot: MavAutopilot::DEFAULT,
15980        heading: 0_u8,
15981        target_heading: 0_u8,
15982        throttle: 0_u8,
15983        airspeed: 0_u8,
15984        airspeed_sp: 0_u8,
15985        groundspeed: 0_u8,
15986        windspeed: 0_u8,
15987        wind_heading: 0_u8,
15988        eph: 0_u8,
15989        epv: 0_u8,
15990        temperature_air: 0_i8,
15991        climb_rate: 0_i8,
15992        battery: 0_i8,
15993        custom0: 0_i8,
15994        custom1: 0_i8,
15995        custom2: 0_i8,
15996    };
15997    #[cfg(feature = "arbitrary")]
15998    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15999        use arbitrary::{Arbitrary, Unstructured};
16000        let mut buf = [0u8; 1024];
16001        rng.fill_bytes(&mut buf);
16002        let mut unstructured = Unstructured::new(&buf);
16003        Self::arbitrary(&mut unstructured).unwrap_or_default()
16004    }
16005}
16006impl Default for HIGH_LATENCY2_DATA {
16007    fn default() -> Self {
16008        Self::DEFAULT.clone()
16009    }
16010}
16011impl MessageData for HIGH_LATENCY2_DATA {
16012    type Message = MavMessage;
16013    const ID: u32 = 235u32;
16014    const NAME: &'static str = "HIGH_LATENCY2";
16015    const EXTRA_CRC: u8 = 179u8;
16016    const ENCODED_LEN: usize = 42usize;
16017    fn deser(
16018        _version: MavlinkVersion,
16019        __input: &[u8],
16020    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16021        let avail_len = __input.len();
16022        let mut payload_buf = [0; Self::ENCODED_LEN];
16023        let mut buf = if avail_len < Self::ENCODED_LEN {
16024            payload_buf[0..avail_len].copy_from_slice(__input);
16025            Bytes::new(&payload_buf)
16026        } else {
16027            Bytes::new(__input)
16028        };
16029        let mut __struct = Self::default();
16030        __struct.timestamp = buf.get_u32_le();
16031        __struct.latitude = buf.get_i32_le();
16032        __struct.longitude = buf.get_i32_le();
16033        __struct.custom_mode = buf.get_u16_le();
16034        __struct.altitude = buf.get_i16_le();
16035        __struct.target_altitude = buf.get_i16_le();
16036        __struct.target_distance = buf.get_u16_le();
16037        __struct.wp_num = buf.get_u16_le();
16038        let tmp = buf.get_u16_le();
16039        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
16040            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16041                flag_type: "HlFailureFlag",
16042                value: tmp as u32,
16043            })?;
16044        let tmp = buf.get_u8();
16045        __struct.mavtype =
16046            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16047                enum_type: "MavType",
16048                value: tmp as u32,
16049            })?;
16050        let tmp = buf.get_u8();
16051        __struct.autopilot =
16052            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16053                enum_type: "MavAutopilot",
16054                value: tmp as u32,
16055            })?;
16056        __struct.heading = buf.get_u8();
16057        __struct.target_heading = buf.get_u8();
16058        __struct.throttle = buf.get_u8();
16059        __struct.airspeed = buf.get_u8();
16060        __struct.airspeed_sp = buf.get_u8();
16061        __struct.groundspeed = buf.get_u8();
16062        __struct.windspeed = buf.get_u8();
16063        __struct.wind_heading = buf.get_u8();
16064        __struct.eph = buf.get_u8();
16065        __struct.epv = buf.get_u8();
16066        __struct.temperature_air = buf.get_i8();
16067        __struct.climb_rate = buf.get_i8();
16068        __struct.battery = buf.get_i8();
16069        __struct.custom0 = buf.get_i8();
16070        __struct.custom1 = buf.get_i8();
16071        __struct.custom2 = buf.get_i8();
16072        Ok(__struct)
16073    }
16074    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16075        let mut __tmp = BytesMut::new(bytes);
16076        #[allow(clippy::absurd_extreme_comparisons)]
16077        #[allow(unused_comparisons)]
16078        if __tmp.remaining() < Self::ENCODED_LEN {
16079            panic!(
16080                "buffer is too small (need {} bytes, but got {})",
16081                Self::ENCODED_LEN,
16082                __tmp.remaining(),
16083            )
16084        }
16085        __tmp.put_u32_le(self.timestamp);
16086        __tmp.put_i32_le(self.latitude);
16087        __tmp.put_i32_le(self.longitude);
16088        __tmp.put_u16_le(self.custom_mode);
16089        __tmp.put_i16_le(self.altitude);
16090        __tmp.put_i16_le(self.target_altitude);
16091        __tmp.put_u16_le(self.target_distance);
16092        __tmp.put_u16_le(self.wp_num);
16093        __tmp.put_u16_le(self.failure_flags.bits());
16094        __tmp.put_u8(self.mavtype as u8);
16095        __tmp.put_u8(self.autopilot as u8);
16096        __tmp.put_u8(self.heading);
16097        __tmp.put_u8(self.target_heading);
16098        __tmp.put_u8(self.throttle);
16099        __tmp.put_u8(self.airspeed);
16100        __tmp.put_u8(self.airspeed_sp);
16101        __tmp.put_u8(self.groundspeed);
16102        __tmp.put_u8(self.windspeed);
16103        __tmp.put_u8(self.wind_heading);
16104        __tmp.put_u8(self.eph);
16105        __tmp.put_u8(self.epv);
16106        __tmp.put_i8(self.temperature_air);
16107        __tmp.put_i8(self.climb_rate);
16108        __tmp.put_i8(self.battery);
16109        __tmp.put_i8(self.custom0);
16110        __tmp.put_i8(self.custom1);
16111        __tmp.put_i8(self.custom2);
16112        if matches!(version, MavlinkVersion::V2) {
16113            let len = __tmp.len();
16114            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16115        } else {
16116            __tmp.len()
16117        }
16118    }
16119}
16120#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
16121#[doc = ""]
16122#[doc = "ID: 93"]
16123#[derive(Debug, Clone, PartialEq)]
16124#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16126#[cfg_attr(feature = "ts", derive(TS))]
16127#[cfg_attr(feature = "ts", ts(export))]
16128pub struct HIL_ACTUATOR_CONTROLS_DATA {
16129    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16130    pub time_usec: u64,
16131    #[doc = "Flags bitmask."]
16132    pub flags: HilActuatorControlsFlags,
16133    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16134    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16135    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16136    pub controls: [f32; 16],
16137    #[doc = "System mode. Includes arming state."]
16138    pub mode: MavModeFlag,
16139}
16140impl HIL_ACTUATOR_CONTROLS_DATA {
16141    pub const ENCODED_LEN: usize = 81usize;
16142    pub const DEFAULT: Self = Self {
16143        time_usec: 0_u64,
16144        flags: HilActuatorControlsFlags::DEFAULT,
16145        controls: [0.0_f32; 16usize],
16146        mode: MavModeFlag::DEFAULT,
16147    };
16148    #[cfg(feature = "arbitrary")]
16149    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16150        use arbitrary::{Arbitrary, Unstructured};
16151        let mut buf = [0u8; 1024];
16152        rng.fill_bytes(&mut buf);
16153        let mut unstructured = Unstructured::new(&buf);
16154        Self::arbitrary(&mut unstructured).unwrap_or_default()
16155    }
16156}
16157impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16158    fn default() -> Self {
16159        Self::DEFAULT.clone()
16160    }
16161}
16162impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16163    type Message = MavMessage;
16164    const ID: u32 = 93u32;
16165    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16166    const EXTRA_CRC: u8 = 47u8;
16167    const ENCODED_LEN: usize = 81usize;
16168    fn deser(
16169        _version: MavlinkVersion,
16170        __input: &[u8],
16171    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16172        let avail_len = __input.len();
16173        let mut payload_buf = [0; Self::ENCODED_LEN];
16174        let mut buf = if avail_len < Self::ENCODED_LEN {
16175            payload_buf[0..avail_len].copy_from_slice(__input);
16176            Bytes::new(&payload_buf)
16177        } else {
16178            Bytes::new(__input)
16179        };
16180        let mut __struct = Self::default();
16181        __struct.time_usec = buf.get_u64_le();
16182        let tmp = buf.get_u64_le();
16183        __struct.flags =
16184            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
16185                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16186                    flag_type: "HilActuatorControlsFlags",
16187                    value: tmp as u32,
16188                })?;
16189        for v in &mut __struct.controls {
16190            let val = buf.get_f32_le();
16191            *v = val;
16192        }
16193        let tmp = buf.get_u8();
16194        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
16195            ::mavlink_core::error::ParserError::InvalidFlag {
16196                flag_type: "MavModeFlag",
16197                value: tmp as u32,
16198            },
16199        )?;
16200        Ok(__struct)
16201    }
16202    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16203        let mut __tmp = BytesMut::new(bytes);
16204        #[allow(clippy::absurd_extreme_comparisons)]
16205        #[allow(unused_comparisons)]
16206        if __tmp.remaining() < Self::ENCODED_LEN {
16207            panic!(
16208                "buffer is too small (need {} bytes, but got {})",
16209                Self::ENCODED_LEN,
16210                __tmp.remaining(),
16211            )
16212        }
16213        __tmp.put_u64_le(self.time_usec);
16214        __tmp.put_u64_le(self.flags.bits());
16215        for val in &self.controls {
16216            __tmp.put_f32_le(*val);
16217        }
16218        __tmp.put_u8(self.mode.bits());
16219        if matches!(version, MavlinkVersion::V2) {
16220            let len = __tmp.len();
16221            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16222        } else {
16223            __tmp.len()
16224        }
16225    }
16226}
16227#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16228#[doc = ""]
16229#[doc = "ID: 91"]
16230#[derive(Debug, Clone, PartialEq)]
16231#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16232#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16233#[cfg_attr(feature = "ts", derive(TS))]
16234#[cfg_attr(feature = "ts", ts(export))]
16235pub struct HIL_CONTROLS_DATA {
16236    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16237    pub time_usec: u64,
16238    #[doc = "Control output -1 .. 1"]
16239    pub roll_ailerons: f32,
16240    #[doc = "Control output -1 .. 1"]
16241    pub pitch_elevator: f32,
16242    #[doc = "Control output -1 .. 1"]
16243    pub yaw_rudder: f32,
16244    #[doc = "Throttle 0 .. 1"]
16245    pub throttle: f32,
16246    #[doc = "Aux 1, -1 .. 1"]
16247    pub aux1: f32,
16248    #[doc = "Aux 2, -1 .. 1"]
16249    pub aux2: f32,
16250    #[doc = "Aux 3, -1 .. 1"]
16251    pub aux3: f32,
16252    #[doc = "Aux 4, -1 .. 1"]
16253    pub aux4: f32,
16254    #[doc = "System mode."]
16255    pub mode: MavMode,
16256    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16257    pub nav_mode: u8,
16258}
16259impl HIL_CONTROLS_DATA {
16260    pub const ENCODED_LEN: usize = 42usize;
16261    pub const DEFAULT: Self = Self {
16262        time_usec: 0_u64,
16263        roll_ailerons: 0.0_f32,
16264        pitch_elevator: 0.0_f32,
16265        yaw_rudder: 0.0_f32,
16266        throttle: 0.0_f32,
16267        aux1: 0.0_f32,
16268        aux2: 0.0_f32,
16269        aux3: 0.0_f32,
16270        aux4: 0.0_f32,
16271        mode: MavMode::DEFAULT,
16272        nav_mode: 0_u8,
16273    };
16274    #[cfg(feature = "arbitrary")]
16275    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16276        use arbitrary::{Arbitrary, Unstructured};
16277        let mut buf = [0u8; 1024];
16278        rng.fill_bytes(&mut buf);
16279        let mut unstructured = Unstructured::new(&buf);
16280        Self::arbitrary(&mut unstructured).unwrap_or_default()
16281    }
16282}
16283impl Default for HIL_CONTROLS_DATA {
16284    fn default() -> Self {
16285        Self::DEFAULT.clone()
16286    }
16287}
16288impl MessageData for HIL_CONTROLS_DATA {
16289    type Message = MavMessage;
16290    const ID: u32 = 91u32;
16291    const NAME: &'static str = "HIL_CONTROLS";
16292    const EXTRA_CRC: u8 = 63u8;
16293    const ENCODED_LEN: usize = 42usize;
16294    fn deser(
16295        _version: MavlinkVersion,
16296        __input: &[u8],
16297    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16298        let avail_len = __input.len();
16299        let mut payload_buf = [0; Self::ENCODED_LEN];
16300        let mut buf = if avail_len < Self::ENCODED_LEN {
16301            payload_buf[0..avail_len].copy_from_slice(__input);
16302            Bytes::new(&payload_buf)
16303        } else {
16304            Bytes::new(__input)
16305        };
16306        let mut __struct = Self::default();
16307        __struct.time_usec = buf.get_u64_le();
16308        __struct.roll_ailerons = buf.get_f32_le();
16309        __struct.pitch_elevator = buf.get_f32_le();
16310        __struct.yaw_rudder = buf.get_f32_le();
16311        __struct.throttle = buf.get_f32_le();
16312        __struct.aux1 = buf.get_f32_le();
16313        __struct.aux2 = buf.get_f32_le();
16314        __struct.aux3 = buf.get_f32_le();
16315        __struct.aux4 = buf.get_f32_le();
16316        let tmp = buf.get_u8();
16317        __struct.mode =
16318            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16319                enum_type: "MavMode",
16320                value: tmp as u32,
16321            })?;
16322        __struct.nav_mode = buf.get_u8();
16323        Ok(__struct)
16324    }
16325    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16326        let mut __tmp = BytesMut::new(bytes);
16327        #[allow(clippy::absurd_extreme_comparisons)]
16328        #[allow(unused_comparisons)]
16329        if __tmp.remaining() < Self::ENCODED_LEN {
16330            panic!(
16331                "buffer is too small (need {} bytes, but got {})",
16332                Self::ENCODED_LEN,
16333                __tmp.remaining(),
16334            )
16335        }
16336        __tmp.put_u64_le(self.time_usec);
16337        __tmp.put_f32_le(self.roll_ailerons);
16338        __tmp.put_f32_le(self.pitch_elevator);
16339        __tmp.put_f32_le(self.yaw_rudder);
16340        __tmp.put_f32_le(self.throttle);
16341        __tmp.put_f32_le(self.aux1);
16342        __tmp.put_f32_le(self.aux2);
16343        __tmp.put_f32_le(self.aux3);
16344        __tmp.put_f32_le(self.aux4);
16345        __tmp.put_u8(self.mode as u8);
16346        __tmp.put_u8(self.nav_mode);
16347        if matches!(version, MavlinkVersion::V2) {
16348            let len = __tmp.len();
16349            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16350        } else {
16351            __tmp.len()
16352        }
16353    }
16354}
16355#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16356#[doc = ""]
16357#[doc = "ID: 113"]
16358#[derive(Debug, Clone, PartialEq)]
16359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16360#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16361#[cfg_attr(feature = "ts", derive(TS))]
16362#[cfg_attr(feature = "ts", ts(export))]
16363pub struct HIL_GPS_DATA {
16364    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16365    pub time_usec: u64,
16366    #[doc = "Latitude (WGS84)"]
16367    pub lat: i32,
16368    #[doc = "Longitude (WGS84)"]
16369    pub lon: i32,
16370    #[doc = "Altitude (MSL). Positive for up."]
16371    pub alt: i32,
16372    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16373    pub eph: u16,
16374    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16375    pub epv: u16,
16376    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16377    pub vel: u16,
16378    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16379    pub vn: i16,
16380    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16381    pub ve: i16,
16382    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16383    pub vd: i16,
16384    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16385    pub cog: u16,
16386    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16387    pub fix_type: u8,
16388    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16389    pub satellites_visible: u8,
16390    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16391    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16392    pub id: u8,
16393    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16394    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16395    pub yaw: u16,
16396}
16397impl HIL_GPS_DATA {
16398    pub const ENCODED_LEN: usize = 39usize;
16399    pub const DEFAULT: Self = Self {
16400        time_usec: 0_u64,
16401        lat: 0_i32,
16402        lon: 0_i32,
16403        alt: 0_i32,
16404        eph: 0_u16,
16405        epv: 0_u16,
16406        vel: 0_u16,
16407        vn: 0_i16,
16408        ve: 0_i16,
16409        vd: 0_i16,
16410        cog: 0_u16,
16411        fix_type: 0_u8,
16412        satellites_visible: 0_u8,
16413        id: 0_u8,
16414        yaw: 0_u16,
16415    };
16416    #[cfg(feature = "arbitrary")]
16417    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16418        use arbitrary::{Arbitrary, Unstructured};
16419        let mut buf = [0u8; 1024];
16420        rng.fill_bytes(&mut buf);
16421        let mut unstructured = Unstructured::new(&buf);
16422        Self::arbitrary(&mut unstructured).unwrap_or_default()
16423    }
16424}
16425impl Default for HIL_GPS_DATA {
16426    fn default() -> Self {
16427        Self::DEFAULT.clone()
16428    }
16429}
16430impl MessageData for HIL_GPS_DATA {
16431    type Message = MavMessage;
16432    const ID: u32 = 113u32;
16433    const NAME: &'static str = "HIL_GPS";
16434    const EXTRA_CRC: u8 = 124u8;
16435    const ENCODED_LEN: usize = 39usize;
16436    fn deser(
16437        _version: MavlinkVersion,
16438        __input: &[u8],
16439    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16440        let avail_len = __input.len();
16441        let mut payload_buf = [0; Self::ENCODED_LEN];
16442        let mut buf = if avail_len < Self::ENCODED_LEN {
16443            payload_buf[0..avail_len].copy_from_slice(__input);
16444            Bytes::new(&payload_buf)
16445        } else {
16446            Bytes::new(__input)
16447        };
16448        let mut __struct = Self::default();
16449        __struct.time_usec = buf.get_u64_le();
16450        __struct.lat = buf.get_i32_le();
16451        __struct.lon = buf.get_i32_le();
16452        __struct.alt = buf.get_i32_le();
16453        __struct.eph = buf.get_u16_le();
16454        __struct.epv = buf.get_u16_le();
16455        __struct.vel = buf.get_u16_le();
16456        __struct.vn = buf.get_i16_le();
16457        __struct.ve = buf.get_i16_le();
16458        __struct.vd = buf.get_i16_le();
16459        __struct.cog = buf.get_u16_le();
16460        __struct.fix_type = buf.get_u8();
16461        __struct.satellites_visible = buf.get_u8();
16462        __struct.id = buf.get_u8();
16463        __struct.yaw = buf.get_u16_le();
16464        Ok(__struct)
16465    }
16466    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16467        let mut __tmp = BytesMut::new(bytes);
16468        #[allow(clippy::absurd_extreme_comparisons)]
16469        #[allow(unused_comparisons)]
16470        if __tmp.remaining() < Self::ENCODED_LEN {
16471            panic!(
16472                "buffer is too small (need {} bytes, but got {})",
16473                Self::ENCODED_LEN,
16474                __tmp.remaining(),
16475            )
16476        }
16477        __tmp.put_u64_le(self.time_usec);
16478        __tmp.put_i32_le(self.lat);
16479        __tmp.put_i32_le(self.lon);
16480        __tmp.put_i32_le(self.alt);
16481        __tmp.put_u16_le(self.eph);
16482        __tmp.put_u16_le(self.epv);
16483        __tmp.put_u16_le(self.vel);
16484        __tmp.put_i16_le(self.vn);
16485        __tmp.put_i16_le(self.ve);
16486        __tmp.put_i16_le(self.vd);
16487        __tmp.put_u16_le(self.cog);
16488        __tmp.put_u8(self.fix_type);
16489        __tmp.put_u8(self.satellites_visible);
16490        if matches!(version, MavlinkVersion::V2) {
16491            __tmp.put_u8(self.id);
16492            __tmp.put_u16_le(self.yaw);
16493            let len = __tmp.len();
16494            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16495        } else {
16496            __tmp.len()
16497        }
16498    }
16499}
16500#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16501#[doc = ""]
16502#[doc = "ID: 114"]
16503#[derive(Debug, Clone, PartialEq)]
16504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16506#[cfg_attr(feature = "ts", derive(TS))]
16507#[cfg_attr(feature = "ts", ts(export))]
16508pub struct HIL_OPTICAL_FLOW_DATA {
16509    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16510    pub time_usec: u64,
16511    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16512    pub integration_time_us: u32,
16513    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16514    pub integrated_x: f32,
16515    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16516    pub integrated_y: f32,
16517    #[doc = "RH rotation around X axis"]
16518    pub integrated_xgyro: f32,
16519    #[doc = "RH rotation around Y axis"]
16520    pub integrated_ygyro: f32,
16521    #[doc = "RH rotation around Z axis"]
16522    pub integrated_zgyro: f32,
16523    #[doc = "Time since the distance was sampled."]
16524    pub time_delta_distance_us: u32,
16525    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16526    pub distance: f32,
16527    #[doc = "Temperature"]
16528    pub temperature: i16,
16529    #[doc = "Sensor ID"]
16530    pub sensor_id: u8,
16531    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16532    pub quality: u8,
16533}
16534impl HIL_OPTICAL_FLOW_DATA {
16535    pub const ENCODED_LEN: usize = 44usize;
16536    pub const DEFAULT: Self = Self {
16537        time_usec: 0_u64,
16538        integration_time_us: 0_u32,
16539        integrated_x: 0.0_f32,
16540        integrated_y: 0.0_f32,
16541        integrated_xgyro: 0.0_f32,
16542        integrated_ygyro: 0.0_f32,
16543        integrated_zgyro: 0.0_f32,
16544        time_delta_distance_us: 0_u32,
16545        distance: 0.0_f32,
16546        temperature: 0_i16,
16547        sensor_id: 0_u8,
16548        quality: 0_u8,
16549    };
16550    #[cfg(feature = "arbitrary")]
16551    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16552        use arbitrary::{Arbitrary, Unstructured};
16553        let mut buf = [0u8; 1024];
16554        rng.fill_bytes(&mut buf);
16555        let mut unstructured = Unstructured::new(&buf);
16556        Self::arbitrary(&mut unstructured).unwrap_or_default()
16557    }
16558}
16559impl Default for HIL_OPTICAL_FLOW_DATA {
16560    fn default() -> Self {
16561        Self::DEFAULT.clone()
16562    }
16563}
16564impl MessageData for HIL_OPTICAL_FLOW_DATA {
16565    type Message = MavMessage;
16566    const ID: u32 = 114u32;
16567    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16568    const EXTRA_CRC: u8 = 237u8;
16569    const ENCODED_LEN: usize = 44usize;
16570    fn deser(
16571        _version: MavlinkVersion,
16572        __input: &[u8],
16573    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16574        let avail_len = __input.len();
16575        let mut payload_buf = [0; Self::ENCODED_LEN];
16576        let mut buf = if avail_len < Self::ENCODED_LEN {
16577            payload_buf[0..avail_len].copy_from_slice(__input);
16578            Bytes::new(&payload_buf)
16579        } else {
16580            Bytes::new(__input)
16581        };
16582        let mut __struct = Self::default();
16583        __struct.time_usec = buf.get_u64_le();
16584        __struct.integration_time_us = buf.get_u32_le();
16585        __struct.integrated_x = buf.get_f32_le();
16586        __struct.integrated_y = buf.get_f32_le();
16587        __struct.integrated_xgyro = buf.get_f32_le();
16588        __struct.integrated_ygyro = buf.get_f32_le();
16589        __struct.integrated_zgyro = buf.get_f32_le();
16590        __struct.time_delta_distance_us = buf.get_u32_le();
16591        __struct.distance = buf.get_f32_le();
16592        __struct.temperature = buf.get_i16_le();
16593        __struct.sensor_id = buf.get_u8();
16594        __struct.quality = buf.get_u8();
16595        Ok(__struct)
16596    }
16597    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16598        let mut __tmp = BytesMut::new(bytes);
16599        #[allow(clippy::absurd_extreme_comparisons)]
16600        #[allow(unused_comparisons)]
16601        if __tmp.remaining() < Self::ENCODED_LEN {
16602            panic!(
16603                "buffer is too small (need {} bytes, but got {})",
16604                Self::ENCODED_LEN,
16605                __tmp.remaining(),
16606            )
16607        }
16608        __tmp.put_u64_le(self.time_usec);
16609        __tmp.put_u32_le(self.integration_time_us);
16610        __tmp.put_f32_le(self.integrated_x);
16611        __tmp.put_f32_le(self.integrated_y);
16612        __tmp.put_f32_le(self.integrated_xgyro);
16613        __tmp.put_f32_le(self.integrated_ygyro);
16614        __tmp.put_f32_le(self.integrated_zgyro);
16615        __tmp.put_u32_le(self.time_delta_distance_us);
16616        __tmp.put_f32_le(self.distance);
16617        __tmp.put_i16_le(self.temperature);
16618        __tmp.put_u8(self.sensor_id);
16619        __tmp.put_u8(self.quality);
16620        if matches!(version, MavlinkVersion::V2) {
16621            let len = __tmp.len();
16622            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16623        } else {
16624            __tmp.len()
16625        }
16626    }
16627}
16628#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16629#[doc = ""]
16630#[doc = "ID: 92"]
16631#[derive(Debug, Clone, PartialEq)]
16632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16633#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16634#[cfg_attr(feature = "ts", derive(TS))]
16635#[cfg_attr(feature = "ts", ts(export))]
16636pub struct HIL_RC_INPUTS_RAW_DATA {
16637    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16638    pub time_usec: u64,
16639    #[doc = "RC channel 1 value"]
16640    pub chan1_raw: u16,
16641    #[doc = "RC channel 2 value"]
16642    pub chan2_raw: u16,
16643    #[doc = "RC channel 3 value"]
16644    pub chan3_raw: u16,
16645    #[doc = "RC channel 4 value"]
16646    pub chan4_raw: u16,
16647    #[doc = "RC channel 5 value"]
16648    pub chan5_raw: u16,
16649    #[doc = "RC channel 6 value"]
16650    pub chan6_raw: u16,
16651    #[doc = "RC channel 7 value"]
16652    pub chan7_raw: u16,
16653    #[doc = "RC channel 8 value"]
16654    pub chan8_raw: u16,
16655    #[doc = "RC channel 9 value"]
16656    pub chan9_raw: u16,
16657    #[doc = "RC channel 10 value"]
16658    pub chan10_raw: u16,
16659    #[doc = "RC channel 11 value"]
16660    pub chan11_raw: u16,
16661    #[doc = "RC channel 12 value"]
16662    pub chan12_raw: u16,
16663    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16664    pub rssi: u8,
16665}
16666impl HIL_RC_INPUTS_RAW_DATA {
16667    pub const ENCODED_LEN: usize = 33usize;
16668    pub const DEFAULT: Self = Self {
16669        time_usec: 0_u64,
16670        chan1_raw: 0_u16,
16671        chan2_raw: 0_u16,
16672        chan3_raw: 0_u16,
16673        chan4_raw: 0_u16,
16674        chan5_raw: 0_u16,
16675        chan6_raw: 0_u16,
16676        chan7_raw: 0_u16,
16677        chan8_raw: 0_u16,
16678        chan9_raw: 0_u16,
16679        chan10_raw: 0_u16,
16680        chan11_raw: 0_u16,
16681        chan12_raw: 0_u16,
16682        rssi: 0_u8,
16683    };
16684    #[cfg(feature = "arbitrary")]
16685    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16686        use arbitrary::{Arbitrary, Unstructured};
16687        let mut buf = [0u8; 1024];
16688        rng.fill_bytes(&mut buf);
16689        let mut unstructured = Unstructured::new(&buf);
16690        Self::arbitrary(&mut unstructured).unwrap_or_default()
16691    }
16692}
16693impl Default for HIL_RC_INPUTS_RAW_DATA {
16694    fn default() -> Self {
16695        Self::DEFAULT.clone()
16696    }
16697}
16698impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16699    type Message = MavMessage;
16700    const ID: u32 = 92u32;
16701    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16702    const EXTRA_CRC: u8 = 54u8;
16703    const ENCODED_LEN: usize = 33usize;
16704    fn deser(
16705        _version: MavlinkVersion,
16706        __input: &[u8],
16707    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16708        let avail_len = __input.len();
16709        let mut payload_buf = [0; Self::ENCODED_LEN];
16710        let mut buf = if avail_len < Self::ENCODED_LEN {
16711            payload_buf[0..avail_len].copy_from_slice(__input);
16712            Bytes::new(&payload_buf)
16713        } else {
16714            Bytes::new(__input)
16715        };
16716        let mut __struct = Self::default();
16717        __struct.time_usec = buf.get_u64_le();
16718        __struct.chan1_raw = buf.get_u16_le();
16719        __struct.chan2_raw = buf.get_u16_le();
16720        __struct.chan3_raw = buf.get_u16_le();
16721        __struct.chan4_raw = buf.get_u16_le();
16722        __struct.chan5_raw = buf.get_u16_le();
16723        __struct.chan6_raw = buf.get_u16_le();
16724        __struct.chan7_raw = buf.get_u16_le();
16725        __struct.chan8_raw = buf.get_u16_le();
16726        __struct.chan9_raw = buf.get_u16_le();
16727        __struct.chan10_raw = buf.get_u16_le();
16728        __struct.chan11_raw = buf.get_u16_le();
16729        __struct.chan12_raw = buf.get_u16_le();
16730        __struct.rssi = buf.get_u8();
16731        Ok(__struct)
16732    }
16733    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16734        let mut __tmp = BytesMut::new(bytes);
16735        #[allow(clippy::absurd_extreme_comparisons)]
16736        #[allow(unused_comparisons)]
16737        if __tmp.remaining() < Self::ENCODED_LEN {
16738            panic!(
16739                "buffer is too small (need {} bytes, but got {})",
16740                Self::ENCODED_LEN,
16741                __tmp.remaining(),
16742            )
16743        }
16744        __tmp.put_u64_le(self.time_usec);
16745        __tmp.put_u16_le(self.chan1_raw);
16746        __tmp.put_u16_le(self.chan2_raw);
16747        __tmp.put_u16_le(self.chan3_raw);
16748        __tmp.put_u16_le(self.chan4_raw);
16749        __tmp.put_u16_le(self.chan5_raw);
16750        __tmp.put_u16_le(self.chan6_raw);
16751        __tmp.put_u16_le(self.chan7_raw);
16752        __tmp.put_u16_le(self.chan8_raw);
16753        __tmp.put_u16_le(self.chan9_raw);
16754        __tmp.put_u16_le(self.chan10_raw);
16755        __tmp.put_u16_le(self.chan11_raw);
16756        __tmp.put_u16_le(self.chan12_raw);
16757        __tmp.put_u8(self.rssi);
16758        if matches!(version, MavlinkVersion::V2) {
16759            let len = __tmp.len();
16760            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16761        } else {
16762            __tmp.len()
16763        }
16764    }
16765}
16766#[doc = "The IMU readings in SI units in NED body frame."]
16767#[doc = ""]
16768#[doc = "ID: 107"]
16769#[derive(Debug, Clone, PartialEq)]
16770#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16771#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16772#[cfg_attr(feature = "ts", derive(TS))]
16773#[cfg_attr(feature = "ts", ts(export))]
16774pub struct HIL_SENSOR_DATA {
16775    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16776    pub time_usec: u64,
16777    #[doc = "X acceleration"]
16778    pub xacc: f32,
16779    #[doc = "Y acceleration"]
16780    pub yacc: f32,
16781    #[doc = "Z acceleration"]
16782    pub zacc: f32,
16783    #[doc = "Angular speed around X axis in body frame"]
16784    pub xgyro: f32,
16785    #[doc = "Angular speed around Y axis in body frame"]
16786    pub ygyro: f32,
16787    #[doc = "Angular speed around Z axis in body frame"]
16788    pub zgyro: f32,
16789    #[doc = "X Magnetic field"]
16790    pub xmag: f32,
16791    #[doc = "Y Magnetic field"]
16792    pub ymag: f32,
16793    #[doc = "Z Magnetic field"]
16794    pub zmag: f32,
16795    #[doc = "Absolute pressure"]
16796    pub abs_pressure: f32,
16797    #[doc = "Differential pressure (airspeed)"]
16798    pub diff_pressure: f32,
16799    #[doc = "Altitude calculated from pressure"]
16800    pub pressure_alt: f32,
16801    #[doc = "Temperature"]
16802    pub temperature: f32,
16803    #[doc = "Bitmap for fields that have updated since last message"]
16804    pub fields_updated: HilSensorUpdatedFlags,
16805    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16806    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16807    pub id: u8,
16808}
16809impl HIL_SENSOR_DATA {
16810    pub const ENCODED_LEN: usize = 65usize;
16811    pub const DEFAULT: Self = Self {
16812        time_usec: 0_u64,
16813        xacc: 0.0_f32,
16814        yacc: 0.0_f32,
16815        zacc: 0.0_f32,
16816        xgyro: 0.0_f32,
16817        ygyro: 0.0_f32,
16818        zgyro: 0.0_f32,
16819        xmag: 0.0_f32,
16820        ymag: 0.0_f32,
16821        zmag: 0.0_f32,
16822        abs_pressure: 0.0_f32,
16823        diff_pressure: 0.0_f32,
16824        pressure_alt: 0.0_f32,
16825        temperature: 0.0_f32,
16826        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16827        id: 0_u8,
16828    };
16829    #[cfg(feature = "arbitrary")]
16830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16831        use arbitrary::{Arbitrary, Unstructured};
16832        let mut buf = [0u8; 1024];
16833        rng.fill_bytes(&mut buf);
16834        let mut unstructured = Unstructured::new(&buf);
16835        Self::arbitrary(&mut unstructured).unwrap_or_default()
16836    }
16837}
16838impl Default for HIL_SENSOR_DATA {
16839    fn default() -> Self {
16840        Self::DEFAULT.clone()
16841    }
16842}
16843impl MessageData for HIL_SENSOR_DATA {
16844    type Message = MavMessage;
16845    const ID: u32 = 107u32;
16846    const NAME: &'static str = "HIL_SENSOR";
16847    const EXTRA_CRC: u8 = 108u8;
16848    const ENCODED_LEN: usize = 65usize;
16849    fn deser(
16850        _version: MavlinkVersion,
16851        __input: &[u8],
16852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16853        let avail_len = __input.len();
16854        let mut payload_buf = [0; Self::ENCODED_LEN];
16855        let mut buf = if avail_len < Self::ENCODED_LEN {
16856            payload_buf[0..avail_len].copy_from_slice(__input);
16857            Bytes::new(&payload_buf)
16858        } else {
16859            Bytes::new(__input)
16860        };
16861        let mut __struct = Self::default();
16862        __struct.time_usec = buf.get_u64_le();
16863        __struct.xacc = buf.get_f32_le();
16864        __struct.yacc = buf.get_f32_le();
16865        __struct.zacc = buf.get_f32_le();
16866        __struct.xgyro = buf.get_f32_le();
16867        __struct.ygyro = buf.get_f32_le();
16868        __struct.zgyro = buf.get_f32_le();
16869        __struct.xmag = buf.get_f32_le();
16870        __struct.ymag = buf.get_f32_le();
16871        __struct.zmag = buf.get_f32_le();
16872        __struct.abs_pressure = buf.get_f32_le();
16873        __struct.diff_pressure = buf.get_f32_le();
16874        __struct.pressure_alt = buf.get_f32_le();
16875        __struct.temperature = buf.get_f32_le();
16876        let tmp = buf.get_u32_le();
16877        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16878            tmp & HilSensorUpdatedFlags::all().bits(),
16879        )
16880        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16881            flag_type: "HilSensorUpdatedFlags",
16882            value: tmp as u32,
16883        })?;
16884        __struct.id = buf.get_u8();
16885        Ok(__struct)
16886    }
16887    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16888        let mut __tmp = BytesMut::new(bytes);
16889        #[allow(clippy::absurd_extreme_comparisons)]
16890        #[allow(unused_comparisons)]
16891        if __tmp.remaining() < Self::ENCODED_LEN {
16892            panic!(
16893                "buffer is too small (need {} bytes, but got {})",
16894                Self::ENCODED_LEN,
16895                __tmp.remaining(),
16896            )
16897        }
16898        __tmp.put_u64_le(self.time_usec);
16899        __tmp.put_f32_le(self.xacc);
16900        __tmp.put_f32_le(self.yacc);
16901        __tmp.put_f32_le(self.zacc);
16902        __tmp.put_f32_le(self.xgyro);
16903        __tmp.put_f32_le(self.ygyro);
16904        __tmp.put_f32_le(self.zgyro);
16905        __tmp.put_f32_le(self.xmag);
16906        __tmp.put_f32_le(self.ymag);
16907        __tmp.put_f32_le(self.zmag);
16908        __tmp.put_f32_le(self.abs_pressure);
16909        __tmp.put_f32_le(self.diff_pressure);
16910        __tmp.put_f32_le(self.pressure_alt);
16911        __tmp.put_f32_le(self.temperature);
16912        __tmp.put_u32_le(self.fields_updated.bits());
16913        if matches!(version, MavlinkVersion::V2) {
16914            __tmp.put_u8(self.id);
16915            let len = __tmp.len();
16916            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16917        } else {
16918            __tmp.len()
16919        }
16920    }
16921}
16922#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16923#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16924#[doc = ""]
16925#[doc = "ID: 90"]
16926#[derive(Debug, Clone, PartialEq)]
16927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16929#[cfg_attr(feature = "ts", derive(TS))]
16930#[cfg_attr(feature = "ts", ts(export))]
16931pub struct HIL_STATE_DATA {
16932    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16933    pub time_usec: u64,
16934    #[doc = "Roll angle"]
16935    pub roll: f32,
16936    #[doc = "Pitch angle"]
16937    pub pitch: f32,
16938    #[doc = "Yaw angle"]
16939    pub yaw: f32,
16940    #[doc = "Body frame roll / phi angular speed"]
16941    pub rollspeed: f32,
16942    #[doc = "Body frame pitch / theta angular speed"]
16943    pub pitchspeed: f32,
16944    #[doc = "Body frame yaw / psi angular speed"]
16945    pub yawspeed: f32,
16946    #[doc = "Latitude"]
16947    pub lat: i32,
16948    #[doc = "Longitude"]
16949    pub lon: i32,
16950    #[doc = "Altitude"]
16951    pub alt: i32,
16952    #[doc = "Ground X Speed (Latitude)"]
16953    pub vx: i16,
16954    #[doc = "Ground Y Speed (Longitude)"]
16955    pub vy: i16,
16956    #[doc = "Ground Z Speed (Altitude)"]
16957    pub vz: i16,
16958    #[doc = "X acceleration"]
16959    pub xacc: i16,
16960    #[doc = "Y acceleration"]
16961    pub yacc: i16,
16962    #[doc = "Z acceleration"]
16963    pub zacc: i16,
16964}
16965impl HIL_STATE_DATA {
16966    pub const ENCODED_LEN: usize = 56usize;
16967    pub const DEFAULT: Self = Self {
16968        time_usec: 0_u64,
16969        roll: 0.0_f32,
16970        pitch: 0.0_f32,
16971        yaw: 0.0_f32,
16972        rollspeed: 0.0_f32,
16973        pitchspeed: 0.0_f32,
16974        yawspeed: 0.0_f32,
16975        lat: 0_i32,
16976        lon: 0_i32,
16977        alt: 0_i32,
16978        vx: 0_i16,
16979        vy: 0_i16,
16980        vz: 0_i16,
16981        xacc: 0_i16,
16982        yacc: 0_i16,
16983        zacc: 0_i16,
16984    };
16985    #[cfg(feature = "arbitrary")]
16986    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16987        use arbitrary::{Arbitrary, Unstructured};
16988        let mut buf = [0u8; 1024];
16989        rng.fill_bytes(&mut buf);
16990        let mut unstructured = Unstructured::new(&buf);
16991        Self::arbitrary(&mut unstructured).unwrap_or_default()
16992    }
16993}
16994impl Default for HIL_STATE_DATA {
16995    fn default() -> Self {
16996        Self::DEFAULT.clone()
16997    }
16998}
16999impl MessageData for HIL_STATE_DATA {
17000    type Message = MavMessage;
17001    const ID: u32 = 90u32;
17002    const NAME: &'static str = "HIL_STATE";
17003    const EXTRA_CRC: u8 = 183u8;
17004    const ENCODED_LEN: usize = 56usize;
17005    fn deser(
17006        _version: MavlinkVersion,
17007        __input: &[u8],
17008    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17009        let avail_len = __input.len();
17010        let mut payload_buf = [0; Self::ENCODED_LEN];
17011        let mut buf = if avail_len < Self::ENCODED_LEN {
17012            payload_buf[0..avail_len].copy_from_slice(__input);
17013            Bytes::new(&payload_buf)
17014        } else {
17015            Bytes::new(__input)
17016        };
17017        let mut __struct = Self::default();
17018        __struct.time_usec = buf.get_u64_le();
17019        __struct.roll = buf.get_f32_le();
17020        __struct.pitch = buf.get_f32_le();
17021        __struct.yaw = buf.get_f32_le();
17022        __struct.rollspeed = buf.get_f32_le();
17023        __struct.pitchspeed = buf.get_f32_le();
17024        __struct.yawspeed = buf.get_f32_le();
17025        __struct.lat = buf.get_i32_le();
17026        __struct.lon = buf.get_i32_le();
17027        __struct.alt = buf.get_i32_le();
17028        __struct.vx = buf.get_i16_le();
17029        __struct.vy = buf.get_i16_le();
17030        __struct.vz = buf.get_i16_le();
17031        __struct.xacc = buf.get_i16_le();
17032        __struct.yacc = buf.get_i16_le();
17033        __struct.zacc = buf.get_i16_le();
17034        Ok(__struct)
17035    }
17036    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17037        let mut __tmp = BytesMut::new(bytes);
17038        #[allow(clippy::absurd_extreme_comparisons)]
17039        #[allow(unused_comparisons)]
17040        if __tmp.remaining() < Self::ENCODED_LEN {
17041            panic!(
17042                "buffer is too small (need {} bytes, but got {})",
17043                Self::ENCODED_LEN,
17044                __tmp.remaining(),
17045            )
17046        }
17047        __tmp.put_u64_le(self.time_usec);
17048        __tmp.put_f32_le(self.roll);
17049        __tmp.put_f32_le(self.pitch);
17050        __tmp.put_f32_le(self.yaw);
17051        __tmp.put_f32_le(self.rollspeed);
17052        __tmp.put_f32_le(self.pitchspeed);
17053        __tmp.put_f32_le(self.yawspeed);
17054        __tmp.put_i32_le(self.lat);
17055        __tmp.put_i32_le(self.lon);
17056        __tmp.put_i32_le(self.alt);
17057        __tmp.put_i16_le(self.vx);
17058        __tmp.put_i16_le(self.vy);
17059        __tmp.put_i16_le(self.vz);
17060        __tmp.put_i16_le(self.xacc);
17061        __tmp.put_i16_le(self.yacc);
17062        __tmp.put_i16_le(self.zacc);
17063        if matches!(version, MavlinkVersion::V2) {
17064            let len = __tmp.len();
17065            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17066        } else {
17067            __tmp.len()
17068        }
17069    }
17070}
17071#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17072#[doc = ""]
17073#[doc = "ID: 115"]
17074#[derive(Debug, Clone, PartialEq)]
17075#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17076#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17077#[cfg_attr(feature = "ts", derive(TS))]
17078#[cfg_attr(feature = "ts", ts(export))]
17079pub struct HIL_STATE_QUATERNION_DATA {
17080    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17081    pub time_usec: u64,
17082    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
17083    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17084    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17085    pub attitude_quaternion: [f32; 4],
17086    #[doc = "Body frame roll / phi angular speed"]
17087    pub rollspeed: f32,
17088    #[doc = "Body frame pitch / theta angular speed"]
17089    pub pitchspeed: f32,
17090    #[doc = "Body frame yaw / psi angular speed"]
17091    pub yawspeed: f32,
17092    #[doc = "Latitude"]
17093    pub lat: i32,
17094    #[doc = "Longitude"]
17095    pub lon: i32,
17096    #[doc = "Altitude"]
17097    pub alt: i32,
17098    #[doc = "Ground X Speed (Latitude)"]
17099    pub vx: i16,
17100    #[doc = "Ground Y Speed (Longitude)"]
17101    pub vy: i16,
17102    #[doc = "Ground Z Speed (Altitude)"]
17103    pub vz: i16,
17104    #[doc = "Indicated airspeed"]
17105    pub ind_airspeed: u16,
17106    #[doc = "True airspeed"]
17107    pub true_airspeed: u16,
17108    #[doc = "X acceleration"]
17109    pub xacc: i16,
17110    #[doc = "Y acceleration"]
17111    pub yacc: i16,
17112    #[doc = "Z acceleration"]
17113    pub zacc: i16,
17114}
17115impl HIL_STATE_QUATERNION_DATA {
17116    pub const ENCODED_LEN: usize = 64usize;
17117    pub const DEFAULT: Self = Self {
17118        time_usec: 0_u64,
17119        attitude_quaternion: [0.0_f32; 4usize],
17120        rollspeed: 0.0_f32,
17121        pitchspeed: 0.0_f32,
17122        yawspeed: 0.0_f32,
17123        lat: 0_i32,
17124        lon: 0_i32,
17125        alt: 0_i32,
17126        vx: 0_i16,
17127        vy: 0_i16,
17128        vz: 0_i16,
17129        ind_airspeed: 0_u16,
17130        true_airspeed: 0_u16,
17131        xacc: 0_i16,
17132        yacc: 0_i16,
17133        zacc: 0_i16,
17134    };
17135    #[cfg(feature = "arbitrary")]
17136    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17137        use arbitrary::{Arbitrary, Unstructured};
17138        let mut buf = [0u8; 1024];
17139        rng.fill_bytes(&mut buf);
17140        let mut unstructured = Unstructured::new(&buf);
17141        Self::arbitrary(&mut unstructured).unwrap_or_default()
17142    }
17143}
17144impl Default for HIL_STATE_QUATERNION_DATA {
17145    fn default() -> Self {
17146        Self::DEFAULT.clone()
17147    }
17148}
17149impl MessageData for HIL_STATE_QUATERNION_DATA {
17150    type Message = MavMessage;
17151    const ID: u32 = 115u32;
17152    const NAME: &'static str = "HIL_STATE_QUATERNION";
17153    const EXTRA_CRC: u8 = 4u8;
17154    const ENCODED_LEN: usize = 64usize;
17155    fn deser(
17156        _version: MavlinkVersion,
17157        __input: &[u8],
17158    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17159        let avail_len = __input.len();
17160        let mut payload_buf = [0; Self::ENCODED_LEN];
17161        let mut buf = if avail_len < Self::ENCODED_LEN {
17162            payload_buf[0..avail_len].copy_from_slice(__input);
17163            Bytes::new(&payload_buf)
17164        } else {
17165            Bytes::new(__input)
17166        };
17167        let mut __struct = Self::default();
17168        __struct.time_usec = buf.get_u64_le();
17169        for v in &mut __struct.attitude_quaternion {
17170            let val = buf.get_f32_le();
17171            *v = val;
17172        }
17173        __struct.rollspeed = buf.get_f32_le();
17174        __struct.pitchspeed = buf.get_f32_le();
17175        __struct.yawspeed = buf.get_f32_le();
17176        __struct.lat = buf.get_i32_le();
17177        __struct.lon = buf.get_i32_le();
17178        __struct.alt = buf.get_i32_le();
17179        __struct.vx = buf.get_i16_le();
17180        __struct.vy = buf.get_i16_le();
17181        __struct.vz = buf.get_i16_le();
17182        __struct.ind_airspeed = buf.get_u16_le();
17183        __struct.true_airspeed = buf.get_u16_le();
17184        __struct.xacc = buf.get_i16_le();
17185        __struct.yacc = buf.get_i16_le();
17186        __struct.zacc = buf.get_i16_le();
17187        Ok(__struct)
17188    }
17189    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17190        let mut __tmp = BytesMut::new(bytes);
17191        #[allow(clippy::absurd_extreme_comparisons)]
17192        #[allow(unused_comparisons)]
17193        if __tmp.remaining() < Self::ENCODED_LEN {
17194            panic!(
17195                "buffer is too small (need {} bytes, but got {})",
17196                Self::ENCODED_LEN,
17197                __tmp.remaining(),
17198            )
17199        }
17200        __tmp.put_u64_le(self.time_usec);
17201        for val in &self.attitude_quaternion {
17202            __tmp.put_f32_le(*val);
17203        }
17204        __tmp.put_f32_le(self.rollspeed);
17205        __tmp.put_f32_le(self.pitchspeed);
17206        __tmp.put_f32_le(self.yawspeed);
17207        __tmp.put_i32_le(self.lat);
17208        __tmp.put_i32_le(self.lon);
17209        __tmp.put_i32_le(self.alt);
17210        __tmp.put_i16_le(self.vx);
17211        __tmp.put_i16_le(self.vy);
17212        __tmp.put_i16_le(self.vz);
17213        __tmp.put_u16_le(self.ind_airspeed);
17214        __tmp.put_u16_le(self.true_airspeed);
17215        __tmp.put_i16_le(self.xacc);
17216        __tmp.put_i16_le(self.yacc);
17217        __tmp.put_i16_le(self.zacc);
17218        if matches!(version, MavlinkVersion::V2) {
17219            let len = __tmp.len();
17220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17221        } else {
17222            __tmp.len()
17223        }
17224    }
17225}
17226#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17227#[doc = ""]
17228#[doc = "ID: 242"]
17229#[derive(Debug, Clone, PartialEq)]
17230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17232#[cfg_attr(feature = "ts", derive(TS))]
17233#[cfg_attr(feature = "ts", ts(export))]
17234pub struct HOME_POSITION_DATA {
17235    #[doc = "Latitude (WGS84)"]
17236    pub latitude: i32,
17237    #[doc = "Longitude (WGS84)"]
17238    pub longitude: i32,
17239    #[doc = "Altitude (MSL). Positive for up."]
17240    pub altitude: i32,
17241    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17242    pub x: f32,
17243    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17244    pub y: f32,
17245    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17246    pub z: f32,
17247    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17248    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17249    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17250    pub q: [f32; 4],
17251    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17252    pub approach_x: f32,
17253    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17254    pub approach_y: f32,
17255    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17256    pub approach_z: f32,
17257    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17258    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17259    pub time_usec: u64,
17260}
17261impl HOME_POSITION_DATA {
17262    pub const ENCODED_LEN: usize = 60usize;
17263    pub const DEFAULT: Self = Self {
17264        latitude: 0_i32,
17265        longitude: 0_i32,
17266        altitude: 0_i32,
17267        x: 0.0_f32,
17268        y: 0.0_f32,
17269        z: 0.0_f32,
17270        q: [0.0_f32; 4usize],
17271        approach_x: 0.0_f32,
17272        approach_y: 0.0_f32,
17273        approach_z: 0.0_f32,
17274        time_usec: 0_u64,
17275    };
17276    #[cfg(feature = "arbitrary")]
17277    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17278        use arbitrary::{Arbitrary, Unstructured};
17279        let mut buf = [0u8; 1024];
17280        rng.fill_bytes(&mut buf);
17281        let mut unstructured = Unstructured::new(&buf);
17282        Self::arbitrary(&mut unstructured).unwrap_or_default()
17283    }
17284}
17285impl Default for HOME_POSITION_DATA {
17286    fn default() -> Self {
17287        Self::DEFAULT.clone()
17288    }
17289}
17290impl MessageData for HOME_POSITION_DATA {
17291    type Message = MavMessage;
17292    const ID: u32 = 242u32;
17293    const NAME: &'static str = "HOME_POSITION";
17294    const EXTRA_CRC: u8 = 104u8;
17295    const ENCODED_LEN: usize = 60usize;
17296    fn deser(
17297        _version: MavlinkVersion,
17298        __input: &[u8],
17299    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17300        let avail_len = __input.len();
17301        let mut payload_buf = [0; Self::ENCODED_LEN];
17302        let mut buf = if avail_len < Self::ENCODED_LEN {
17303            payload_buf[0..avail_len].copy_from_slice(__input);
17304            Bytes::new(&payload_buf)
17305        } else {
17306            Bytes::new(__input)
17307        };
17308        let mut __struct = Self::default();
17309        __struct.latitude = buf.get_i32_le();
17310        __struct.longitude = buf.get_i32_le();
17311        __struct.altitude = buf.get_i32_le();
17312        __struct.x = buf.get_f32_le();
17313        __struct.y = buf.get_f32_le();
17314        __struct.z = buf.get_f32_le();
17315        for v in &mut __struct.q {
17316            let val = buf.get_f32_le();
17317            *v = val;
17318        }
17319        __struct.approach_x = buf.get_f32_le();
17320        __struct.approach_y = buf.get_f32_le();
17321        __struct.approach_z = buf.get_f32_le();
17322        __struct.time_usec = buf.get_u64_le();
17323        Ok(__struct)
17324    }
17325    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17326        let mut __tmp = BytesMut::new(bytes);
17327        #[allow(clippy::absurd_extreme_comparisons)]
17328        #[allow(unused_comparisons)]
17329        if __tmp.remaining() < Self::ENCODED_LEN {
17330            panic!(
17331                "buffer is too small (need {} bytes, but got {})",
17332                Self::ENCODED_LEN,
17333                __tmp.remaining(),
17334            )
17335        }
17336        __tmp.put_i32_le(self.latitude);
17337        __tmp.put_i32_le(self.longitude);
17338        __tmp.put_i32_le(self.altitude);
17339        __tmp.put_f32_le(self.x);
17340        __tmp.put_f32_le(self.y);
17341        __tmp.put_f32_le(self.z);
17342        for val in &self.q {
17343            __tmp.put_f32_le(*val);
17344        }
17345        __tmp.put_f32_le(self.approach_x);
17346        __tmp.put_f32_le(self.approach_y);
17347        __tmp.put_f32_le(self.approach_z);
17348        if matches!(version, MavlinkVersion::V2) {
17349            __tmp.put_u64_le(self.time_usec);
17350            let len = __tmp.len();
17351            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17352        } else {
17353            __tmp.len()
17354        }
17355    }
17356}
17357#[doc = "Temperature and humidity from hygrometer."]
17358#[doc = ""]
17359#[doc = "ID: 12920"]
17360#[derive(Debug, Clone, PartialEq)]
17361#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17362#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17363#[cfg_attr(feature = "ts", derive(TS))]
17364#[cfg_attr(feature = "ts", ts(export))]
17365pub struct HYGROMETER_SENSOR_DATA {
17366    #[doc = "Temperature"]
17367    pub temperature: i16,
17368    #[doc = "Humidity"]
17369    pub humidity: u16,
17370    #[doc = "Hygrometer ID"]
17371    pub id: u8,
17372}
17373impl HYGROMETER_SENSOR_DATA {
17374    pub const ENCODED_LEN: usize = 5usize;
17375    pub const DEFAULT: Self = Self {
17376        temperature: 0_i16,
17377        humidity: 0_u16,
17378        id: 0_u8,
17379    };
17380    #[cfg(feature = "arbitrary")]
17381    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17382        use arbitrary::{Arbitrary, Unstructured};
17383        let mut buf = [0u8; 1024];
17384        rng.fill_bytes(&mut buf);
17385        let mut unstructured = Unstructured::new(&buf);
17386        Self::arbitrary(&mut unstructured).unwrap_or_default()
17387    }
17388}
17389impl Default for HYGROMETER_SENSOR_DATA {
17390    fn default() -> Self {
17391        Self::DEFAULT.clone()
17392    }
17393}
17394impl MessageData for HYGROMETER_SENSOR_DATA {
17395    type Message = MavMessage;
17396    const ID: u32 = 12920u32;
17397    const NAME: &'static str = "HYGROMETER_SENSOR";
17398    const EXTRA_CRC: u8 = 20u8;
17399    const ENCODED_LEN: usize = 5usize;
17400    fn deser(
17401        _version: MavlinkVersion,
17402        __input: &[u8],
17403    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17404        let avail_len = __input.len();
17405        let mut payload_buf = [0; Self::ENCODED_LEN];
17406        let mut buf = if avail_len < Self::ENCODED_LEN {
17407            payload_buf[0..avail_len].copy_from_slice(__input);
17408            Bytes::new(&payload_buf)
17409        } else {
17410            Bytes::new(__input)
17411        };
17412        let mut __struct = Self::default();
17413        __struct.temperature = buf.get_i16_le();
17414        __struct.humidity = buf.get_u16_le();
17415        __struct.id = buf.get_u8();
17416        Ok(__struct)
17417    }
17418    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17419        let mut __tmp = BytesMut::new(bytes);
17420        #[allow(clippy::absurd_extreme_comparisons)]
17421        #[allow(unused_comparisons)]
17422        if __tmp.remaining() < Self::ENCODED_LEN {
17423            panic!(
17424                "buffer is too small (need {} bytes, but got {})",
17425                Self::ENCODED_LEN,
17426                __tmp.remaining(),
17427            )
17428        }
17429        __tmp.put_i16_le(self.temperature);
17430        __tmp.put_u16_le(self.humidity);
17431        __tmp.put_u8(self.id);
17432        if matches!(version, MavlinkVersion::V2) {
17433            let len = __tmp.len();
17434            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17435        } else {
17436            __tmp.len()
17437        }
17438    }
17439}
17440#[doc = "Illuminator status."]
17441#[doc = ""]
17442#[doc = "ID: 440"]
17443#[derive(Debug, Clone, PartialEq)]
17444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17445#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17446#[cfg_attr(feature = "ts", derive(TS))]
17447#[cfg_attr(feature = "ts", ts(export))]
17448pub struct ILLUMINATOR_STATUS_DATA {
17449    #[doc = "Time since the start-up of the illuminator in ms"]
17450    pub uptime_ms: u32,
17451    #[doc = "Errors"]
17452    pub error_status: IlluminatorErrorFlags,
17453    #[doc = "Illuminator brightness"]
17454    pub brightness: f32,
17455    #[doc = "Illuminator strobing period in seconds"]
17456    pub strobe_period: f32,
17457    #[doc = "Illuminator strobing duty cycle"]
17458    pub strobe_duty_cycle: f32,
17459    #[doc = "Temperature in Celsius"]
17460    pub temp_c: f32,
17461    #[doc = "Minimum strobing period in seconds"]
17462    pub min_strobe_period: f32,
17463    #[doc = "Maximum strobing period in seconds"]
17464    pub max_strobe_period: f32,
17465    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17466    pub enable: u8,
17467    #[doc = "Supported illuminator modes"]
17468    pub mode_bitmask: IlluminatorMode,
17469    #[doc = "Illuminator mode"]
17470    pub mode: IlluminatorMode,
17471}
17472impl ILLUMINATOR_STATUS_DATA {
17473    pub const ENCODED_LEN: usize = 35usize;
17474    pub const DEFAULT: Self = Self {
17475        uptime_ms: 0_u32,
17476        error_status: IlluminatorErrorFlags::DEFAULT,
17477        brightness: 0.0_f32,
17478        strobe_period: 0.0_f32,
17479        strobe_duty_cycle: 0.0_f32,
17480        temp_c: 0.0_f32,
17481        min_strobe_period: 0.0_f32,
17482        max_strobe_period: 0.0_f32,
17483        enable: 0_u8,
17484        mode_bitmask: IlluminatorMode::DEFAULT,
17485        mode: IlluminatorMode::DEFAULT,
17486    };
17487    #[cfg(feature = "arbitrary")]
17488    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17489        use arbitrary::{Arbitrary, Unstructured};
17490        let mut buf = [0u8; 1024];
17491        rng.fill_bytes(&mut buf);
17492        let mut unstructured = Unstructured::new(&buf);
17493        Self::arbitrary(&mut unstructured).unwrap_or_default()
17494    }
17495}
17496impl Default for ILLUMINATOR_STATUS_DATA {
17497    fn default() -> Self {
17498        Self::DEFAULT.clone()
17499    }
17500}
17501impl MessageData for ILLUMINATOR_STATUS_DATA {
17502    type Message = MavMessage;
17503    const ID: u32 = 440u32;
17504    const NAME: &'static str = "ILLUMINATOR_STATUS";
17505    const EXTRA_CRC: u8 = 66u8;
17506    const ENCODED_LEN: usize = 35usize;
17507    fn deser(
17508        _version: MavlinkVersion,
17509        __input: &[u8],
17510    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17511        let avail_len = __input.len();
17512        let mut payload_buf = [0; Self::ENCODED_LEN];
17513        let mut buf = if avail_len < Self::ENCODED_LEN {
17514            payload_buf[0..avail_len].copy_from_slice(__input);
17515            Bytes::new(&payload_buf)
17516        } else {
17517            Bytes::new(__input)
17518        };
17519        let mut __struct = Self::default();
17520        __struct.uptime_ms = buf.get_u32_le();
17521        let tmp = buf.get_u32_le();
17522        __struct.error_status = IlluminatorErrorFlags::from_bits(
17523            tmp & IlluminatorErrorFlags::all().bits(),
17524        )
17525        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17526            flag_type: "IlluminatorErrorFlags",
17527            value: tmp as u32,
17528        })?;
17529        __struct.brightness = buf.get_f32_le();
17530        __struct.strobe_period = buf.get_f32_le();
17531        __struct.strobe_duty_cycle = buf.get_f32_le();
17532        __struct.temp_c = buf.get_f32_le();
17533        __struct.min_strobe_period = buf.get_f32_le();
17534        __struct.max_strobe_period = buf.get_f32_le();
17535        __struct.enable = buf.get_u8();
17536        let tmp = buf.get_u8();
17537        __struct.mode_bitmask =
17538            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17539                enum_type: "IlluminatorMode",
17540                value: tmp as u32,
17541            })?;
17542        let tmp = buf.get_u8();
17543        __struct.mode =
17544            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17545                enum_type: "IlluminatorMode",
17546                value: tmp as u32,
17547            })?;
17548        Ok(__struct)
17549    }
17550    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17551        let mut __tmp = BytesMut::new(bytes);
17552        #[allow(clippy::absurd_extreme_comparisons)]
17553        #[allow(unused_comparisons)]
17554        if __tmp.remaining() < Self::ENCODED_LEN {
17555            panic!(
17556                "buffer is too small (need {} bytes, but got {})",
17557                Self::ENCODED_LEN,
17558                __tmp.remaining(),
17559            )
17560        }
17561        __tmp.put_u32_le(self.uptime_ms);
17562        __tmp.put_u32_le(self.error_status.bits());
17563        __tmp.put_f32_le(self.brightness);
17564        __tmp.put_f32_le(self.strobe_period);
17565        __tmp.put_f32_le(self.strobe_duty_cycle);
17566        __tmp.put_f32_le(self.temp_c);
17567        __tmp.put_f32_le(self.min_strobe_period);
17568        __tmp.put_f32_le(self.max_strobe_period);
17569        __tmp.put_u8(self.enable);
17570        __tmp.put_u8(self.mode_bitmask as u8);
17571        __tmp.put_u8(self.mode as u8);
17572        if matches!(version, MavlinkVersion::V2) {
17573            let len = __tmp.len();
17574            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17575        } else {
17576            __tmp.len()
17577        }
17578    }
17579}
17580#[doc = "Status of the Iridium SBD link."]
17581#[doc = ""]
17582#[doc = "ID: 335"]
17583#[derive(Debug, Clone, PartialEq)]
17584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17585#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17586#[cfg_attr(feature = "ts", derive(TS))]
17587#[cfg_attr(feature = "ts", ts(export))]
17588pub struct ISBD_LINK_STATUS_DATA {
17589    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17590    pub timestamp: u64,
17591    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17592    pub last_heartbeat: u64,
17593    #[doc = "Number of failed SBD sessions."]
17594    pub failed_sessions: u16,
17595    #[doc = "Number of successful SBD sessions."]
17596    pub successful_sessions: u16,
17597    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17598    pub signal_quality: u8,
17599    #[doc = "1: Ring call pending, 0: No call pending."]
17600    pub ring_pending: u8,
17601    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17602    pub tx_session_pending: u8,
17603    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17604    pub rx_session_pending: u8,
17605}
17606impl ISBD_LINK_STATUS_DATA {
17607    pub const ENCODED_LEN: usize = 24usize;
17608    pub const DEFAULT: Self = Self {
17609        timestamp: 0_u64,
17610        last_heartbeat: 0_u64,
17611        failed_sessions: 0_u16,
17612        successful_sessions: 0_u16,
17613        signal_quality: 0_u8,
17614        ring_pending: 0_u8,
17615        tx_session_pending: 0_u8,
17616        rx_session_pending: 0_u8,
17617    };
17618    #[cfg(feature = "arbitrary")]
17619    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17620        use arbitrary::{Arbitrary, Unstructured};
17621        let mut buf = [0u8; 1024];
17622        rng.fill_bytes(&mut buf);
17623        let mut unstructured = Unstructured::new(&buf);
17624        Self::arbitrary(&mut unstructured).unwrap_or_default()
17625    }
17626}
17627impl Default for ISBD_LINK_STATUS_DATA {
17628    fn default() -> Self {
17629        Self::DEFAULT.clone()
17630    }
17631}
17632impl MessageData for ISBD_LINK_STATUS_DATA {
17633    type Message = MavMessage;
17634    const ID: u32 = 335u32;
17635    const NAME: &'static str = "ISBD_LINK_STATUS";
17636    const EXTRA_CRC: u8 = 225u8;
17637    const ENCODED_LEN: usize = 24usize;
17638    fn deser(
17639        _version: MavlinkVersion,
17640        __input: &[u8],
17641    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17642        let avail_len = __input.len();
17643        let mut payload_buf = [0; Self::ENCODED_LEN];
17644        let mut buf = if avail_len < Self::ENCODED_LEN {
17645            payload_buf[0..avail_len].copy_from_slice(__input);
17646            Bytes::new(&payload_buf)
17647        } else {
17648            Bytes::new(__input)
17649        };
17650        let mut __struct = Self::default();
17651        __struct.timestamp = buf.get_u64_le();
17652        __struct.last_heartbeat = buf.get_u64_le();
17653        __struct.failed_sessions = buf.get_u16_le();
17654        __struct.successful_sessions = buf.get_u16_le();
17655        __struct.signal_quality = buf.get_u8();
17656        __struct.ring_pending = buf.get_u8();
17657        __struct.tx_session_pending = buf.get_u8();
17658        __struct.rx_session_pending = buf.get_u8();
17659        Ok(__struct)
17660    }
17661    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17662        let mut __tmp = BytesMut::new(bytes);
17663        #[allow(clippy::absurd_extreme_comparisons)]
17664        #[allow(unused_comparisons)]
17665        if __tmp.remaining() < Self::ENCODED_LEN {
17666            panic!(
17667                "buffer is too small (need {} bytes, but got {})",
17668                Self::ENCODED_LEN,
17669                __tmp.remaining(),
17670            )
17671        }
17672        __tmp.put_u64_le(self.timestamp);
17673        __tmp.put_u64_le(self.last_heartbeat);
17674        __tmp.put_u16_le(self.failed_sessions);
17675        __tmp.put_u16_le(self.successful_sessions);
17676        __tmp.put_u8(self.signal_quality);
17677        __tmp.put_u8(self.ring_pending);
17678        __tmp.put_u8(self.tx_session_pending);
17679        __tmp.put_u8(self.rx_session_pending);
17680        if matches!(version, MavlinkVersion::V2) {
17681            let len = __tmp.len();
17682            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17683        } else {
17684            __tmp.len()
17685        }
17686    }
17687}
17688#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17689#[doc = ""]
17690#[doc = "ID: 149"]
17691#[derive(Debug, Clone, PartialEq)]
17692#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17693#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17694#[cfg_attr(feature = "ts", derive(TS))]
17695#[cfg_attr(feature = "ts", ts(export))]
17696pub struct LANDING_TARGET_DATA {
17697    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17698    pub time_usec: u64,
17699    #[doc = "X-axis angular offset of the target from the center of the image"]
17700    pub angle_x: f32,
17701    #[doc = "Y-axis angular offset of the target from the center of the image"]
17702    pub angle_y: f32,
17703    #[doc = "Distance to the target from the vehicle"]
17704    pub distance: f32,
17705    #[doc = "Size of target along x-axis"]
17706    pub size_x: f32,
17707    #[doc = "Size of target along y-axis"]
17708    pub size_y: f32,
17709    #[doc = "The ID of the target if multiple targets are present"]
17710    pub target_num: u8,
17711    #[doc = "Coordinate frame used for following fields."]
17712    pub frame: MavFrame,
17713    #[doc = "X Position of the landing target in MAV_FRAME"]
17714    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17715    pub x: f32,
17716    #[doc = "Y Position of the landing target in MAV_FRAME"]
17717    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17718    pub y: f32,
17719    #[doc = "Z Position of the landing target in MAV_FRAME"]
17720    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17721    pub z: f32,
17722    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17723    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17724    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17725    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17726    pub q: [f32; 4],
17727    #[doc = "Type of landing target"]
17728    #[cfg_attr(feature = "serde", serde(default))]
17729    pub mavtype: LandingTargetType,
17730    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17731    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17732    pub position_valid: u8,
17733}
17734impl LANDING_TARGET_DATA {
17735    pub const ENCODED_LEN: usize = 60usize;
17736    pub const DEFAULT: Self = Self {
17737        time_usec: 0_u64,
17738        angle_x: 0.0_f32,
17739        angle_y: 0.0_f32,
17740        distance: 0.0_f32,
17741        size_x: 0.0_f32,
17742        size_y: 0.0_f32,
17743        target_num: 0_u8,
17744        frame: MavFrame::DEFAULT,
17745        x: 0.0_f32,
17746        y: 0.0_f32,
17747        z: 0.0_f32,
17748        q: [0.0_f32; 4usize],
17749        mavtype: LandingTargetType::DEFAULT,
17750        position_valid: 0_u8,
17751    };
17752    #[cfg(feature = "arbitrary")]
17753    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17754        use arbitrary::{Arbitrary, Unstructured};
17755        let mut buf = [0u8; 1024];
17756        rng.fill_bytes(&mut buf);
17757        let mut unstructured = Unstructured::new(&buf);
17758        Self::arbitrary(&mut unstructured).unwrap_or_default()
17759    }
17760}
17761impl Default for LANDING_TARGET_DATA {
17762    fn default() -> Self {
17763        Self::DEFAULT.clone()
17764    }
17765}
17766impl MessageData for LANDING_TARGET_DATA {
17767    type Message = MavMessage;
17768    const ID: u32 = 149u32;
17769    const NAME: &'static str = "LANDING_TARGET";
17770    const EXTRA_CRC: u8 = 200u8;
17771    const ENCODED_LEN: usize = 60usize;
17772    fn deser(
17773        _version: MavlinkVersion,
17774        __input: &[u8],
17775    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17776        let avail_len = __input.len();
17777        let mut payload_buf = [0; Self::ENCODED_LEN];
17778        let mut buf = if avail_len < Self::ENCODED_LEN {
17779            payload_buf[0..avail_len].copy_from_slice(__input);
17780            Bytes::new(&payload_buf)
17781        } else {
17782            Bytes::new(__input)
17783        };
17784        let mut __struct = Self::default();
17785        __struct.time_usec = buf.get_u64_le();
17786        __struct.angle_x = buf.get_f32_le();
17787        __struct.angle_y = buf.get_f32_le();
17788        __struct.distance = buf.get_f32_le();
17789        __struct.size_x = buf.get_f32_le();
17790        __struct.size_y = buf.get_f32_le();
17791        __struct.target_num = buf.get_u8();
17792        let tmp = buf.get_u8();
17793        __struct.frame =
17794            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17795                enum_type: "MavFrame",
17796                value: tmp as u32,
17797            })?;
17798        __struct.x = buf.get_f32_le();
17799        __struct.y = buf.get_f32_le();
17800        __struct.z = buf.get_f32_le();
17801        for v in &mut __struct.q {
17802            let val = buf.get_f32_le();
17803            *v = val;
17804        }
17805        let tmp = buf.get_u8();
17806        __struct.mavtype =
17807            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17808                enum_type: "LandingTargetType",
17809                value: tmp as u32,
17810            })?;
17811        __struct.position_valid = buf.get_u8();
17812        Ok(__struct)
17813    }
17814    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17815        let mut __tmp = BytesMut::new(bytes);
17816        #[allow(clippy::absurd_extreme_comparisons)]
17817        #[allow(unused_comparisons)]
17818        if __tmp.remaining() < Self::ENCODED_LEN {
17819            panic!(
17820                "buffer is too small (need {} bytes, but got {})",
17821                Self::ENCODED_LEN,
17822                __tmp.remaining(),
17823            )
17824        }
17825        __tmp.put_u64_le(self.time_usec);
17826        __tmp.put_f32_le(self.angle_x);
17827        __tmp.put_f32_le(self.angle_y);
17828        __tmp.put_f32_le(self.distance);
17829        __tmp.put_f32_le(self.size_x);
17830        __tmp.put_f32_le(self.size_y);
17831        __tmp.put_u8(self.target_num);
17832        __tmp.put_u8(self.frame as u8);
17833        if matches!(version, MavlinkVersion::V2) {
17834            __tmp.put_f32_le(self.x);
17835            __tmp.put_f32_le(self.y);
17836            __tmp.put_f32_le(self.z);
17837            for val in &self.q {
17838                __tmp.put_f32_le(*val);
17839            }
17840            __tmp.put_u8(self.mavtype as u8);
17841            __tmp.put_u8(self.position_valid);
17842            let len = __tmp.len();
17843            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17844        } else {
17845            __tmp.len()
17846        }
17847    }
17848}
17849#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17850#[doc = ""]
17851#[doc = "ID: 8"]
17852#[derive(Debug, Clone, PartialEq)]
17853#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17854#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17855#[cfg_attr(feature = "ts", derive(TS))]
17856#[cfg_attr(feature = "ts", ts(export))]
17857pub struct LINK_NODE_STATUS_DATA {
17858    #[doc = "Timestamp (time since system boot)."]
17859    pub timestamp: u64,
17860    #[doc = "Transmit rate"]
17861    pub tx_rate: u32,
17862    #[doc = "Receive rate"]
17863    pub rx_rate: u32,
17864    #[doc = "Messages sent"]
17865    pub messages_sent: u32,
17866    #[doc = "Messages received (estimated from counting seq)"]
17867    pub messages_received: u32,
17868    #[doc = "Messages lost (estimated from counting seq)"]
17869    pub messages_lost: u32,
17870    #[doc = "Number of bytes that could not be parsed correctly."]
17871    pub rx_parse_err: u16,
17872    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17873    pub tx_overflows: u16,
17874    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17875    pub rx_overflows: u16,
17876    #[doc = "Remaining free transmit buffer space"]
17877    pub tx_buf: u8,
17878    #[doc = "Remaining free receive buffer space"]
17879    pub rx_buf: u8,
17880}
17881impl LINK_NODE_STATUS_DATA {
17882    pub const ENCODED_LEN: usize = 36usize;
17883    pub const DEFAULT: Self = Self {
17884        timestamp: 0_u64,
17885        tx_rate: 0_u32,
17886        rx_rate: 0_u32,
17887        messages_sent: 0_u32,
17888        messages_received: 0_u32,
17889        messages_lost: 0_u32,
17890        rx_parse_err: 0_u16,
17891        tx_overflows: 0_u16,
17892        rx_overflows: 0_u16,
17893        tx_buf: 0_u8,
17894        rx_buf: 0_u8,
17895    };
17896    #[cfg(feature = "arbitrary")]
17897    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17898        use arbitrary::{Arbitrary, Unstructured};
17899        let mut buf = [0u8; 1024];
17900        rng.fill_bytes(&mut buf);
17901        let mut unstructured = Unstructured::new(&buf);
17902        Self::arbitrary(&mut unstructured).unwrap_or_default()
17903    }
17904}
17905impl Default for LINK_NODE_STATUS_DATA {
17906    fn default() -> Self {
17907        Self::DEFAULT.clone()
17908    }
17909}
17910impl MessageData for LINK_NODE_STATUS_DATA {
17911    type Message = MavMessage;
17912    const ID: u32 = 8u32;
17913    const NAME: &'static str = "LINK_NODE_STATUS";
17914    const EXTRA_CRC: u8 = 117u8;
17915    const ENCODED_LEN: usize = 36usize;
17916    fn deser(
17917        _version: MavlinkVersion,
17918        __input: &[u8],
17919    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17920        let avail_len = __input.len();
17921        let mut payload_buf = [0; Self::ENCODED_LEN];
17922        let mut buf = if avail_len < Self::ENCODED_LEN {
17923            payload_buf[0..avail_len].copy_from_slice(__input);
17924            Bytes::new(&payload_buf)
17925        } else {
17926            Bytes::new(__input)
17927        };
17928        let mut __struct = Self::default();
17929        __struct.timestamp = buf.get_u64_le();
17930        __struct.tx_rate = buf.get_u32_le();
17931        __struct.rx_rate = buf.get_u32_le();
17932        __struct.messages_sent = buf.get_u32_le();
17933        __struct.messages_received = buf.get_u32_le();
17934        __struct.messages_lost = buf.get_u32_le();
17935        __struct.rx_parse_err = buf.get_u16_le();
17936        __struct.tx_overflows = buf.get_u16_le();
17937        __struct.rx_overflows = buf.get_u16_le();
17938        __struct.tx_buf = buf.get_u8();
17939        __struct.rx_buf = buf.get_u8();
17940        Ok(__struct)
17941    }
17942    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17943        let mut __tmp = BytesMut::new(bytes);
17944        #[allow(clippy::absurd_extreme_comparisons)]
17945        #[allow(unused_comparisons)]
17946        if __tmp.remaining() < Self::ENCODED_LEN {
17947            panic!(
17948                "buffer is too small (need {} bytes, but got {})",
17949                Self::ENCODED_LEN,
17950                __tmp.remaining(),
17951            )
17952        }
17953        __tmp.put_u64_le(self.timestamp);
17954        __tmp.put_u32_le(self.tx_rate);
17955        __tmp.put_u32_le(self.rx_rate);
17956        __tmp.put_u32_le(self.messages_sent);
17957        __tmp.put_u32_le(self.messages_received);
17958        __tmp.put_u32_le(self.messages_lost);
17959        __tmp.put_u16_le(self.rx_parse_err);
17960        __tmp.put_u16_le(self.tx_overflows);
17961        __tmp.put_u16_le(self.rx_overflows);
17962        __tmp.put_u8(self.tx_buf);
17963        __tmp.put_u8(self.rx_buf);
17964        if matches!(version, MavlinkVersion::V2) {
17965            let len = __tmp.len();
17966            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17967        } else {
17968            __tmp.len()
17969        }
17970    }
17971}
17972#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17973#[doc = ""]
17974#[doc = "ID: 32"]
17975#[derive(Debug, Clone, PartialEq)]
17976#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17978#[cfg_attr(feature = "ts", derive(TS))]
17979#[cfg_attr(feature = "ts", ts(export))]
17980pub struct LOCAL_POSITION_NED_DATA {
17981    #[doc = "Timestamp (time since system boot)."]
17982    pub time_boot_ms: u32,
17983    #[doc = "X Position"]
17984    pub x: f32,
17985    #[doc = "Y Position"]
17986    pub y: f32,
17987    #[doc = "Z Position"]
17988    pub z: f32,
17989    #[doc = "X Speed"]
17990    pub vx: f32,
17991    #[doc = "Y Speed"]
17992    pub vy: f32,
17993    #[doc = "Z Speed"]
17994    pub vz: f32,
17995}
17996impl LOCAL_POSITION_NED_DATA {
17997    pub const ENCODED_LEN: usize = 28usize;
17998    pub const DEFAULT: Self = Self {
17999        time_boot_ms: 0_u32,
18000        x: 0.0_f32,
18001        y: 0.0_f32,
18002        z: 0.0_f32,
18003        vx: 0.0_f32,
18004        vy: 0.0_f32,
18005        vz: 0.0_f32,
18006    };
18007    #[cfg(feature = "arbitrary")]
18008    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18009        use arbitrary::{Arbitrary, Unstructured};
18010        let mut buf = [0u8; 1024];
18011        rng.fill_bytes(&mut buf);
18012        let mut unstructured = Unstructured::new(&buf);
18013        Self::arbitrary(&mut unstructured).unwrap_or_default()
18014    }
18015}
18016impl Default for LOCAL_POSITION_NED_DATA {
18017    fn default() -> Self {
18018        Self::DEFAULT.clone()
18019    }
18020}
18021impl MessageData for LOCAL_POSITION_NED_DATA {
18022    type Message = MavMessage;
18023    const ID: u32 = 32u32;
18024    const NAME: &'static str = "LOCAL_POSITION_NED";
18025    const EXTRA_CRC: u8 = 185u8;
18026    const ENCODED_LEN: usize = 28usize;
18027    fn deser(
18028        _version: MavlinkVersion,
18029        __input: &[u8],
18030    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18031        let avail_len = __input.len();
18032        let mut payload_buf = [0; Self::ENCODED_LEN];
18033        let mut buf = if avail_len < Self::ENCODED_LEN {
18034            payload_buf[0..avail_len].copy_from_slice(__input);
18035            Bytes::new(&payload_buf)
18036        } else {
18037            Bytes::new(__input)
18038        };
18039        let mut __struct = Self::default();
18040        __struct.time_boot_ms = buf.get_u32_le();
18041        __struct.x = buf.get_f32_le();
18042        __struct.y = buf.get_f32_le();
18043        __struct.z = buf.get_f32_le();
18044        __struct.vx = buf.get_f32_le();
18045        __struct.vy = buf.get_f32_le();
18046        __struct.vz = buf.get_f32_le();
18047        Ok(__struct)
18048    }
18049    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18050        let mut __tmp = BytesMut::new(bytes);
18051        #[allow(clippy::absurd_extreme_comparisons)]
18052        #[allow(unused_comparisons)]
18053        if __tmp.remaining() < Self::ENCODED_LEN {
18054            panic!(
18055                "buffer is too small (need {} bytes, but got {})",
18056                Self::ENCODED_LEN,
18057                __tmp.remaining(),
18058            )
18059        }
18060        __tmp.put_u32_le(self.time_boot_ms);
18061        __tmp.put_f32_le(self.x);
18062        __tmp.put_f32_le(self.y);
18063        __tmp.put_f32_le(self.z);
18064        __tmp.put_f32_le(self.vx);
18065        __tmp.put_f32_le(self.vy);
18066        __tmp.put_f32_le(self.vz);
18067        if matches!(version, MavlinkVersion::V2) {
18068            let len = __tmp.len();
18069            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18070        } else {
18071            __tmp.len()
18072        }
18073    }
18074}
18075#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18076#[doc = ""]
18077#[doc = "ID: 64"]
18078#[derive(Debug, Clone, PartialEq)]
18079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18080#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18081#[cfg_attr(feature = "ts", derive(TS))]
18082#[cfg_attr(feature = "ts", ts(export))]
18083pub struct LOCAL_POSITION_NED_COV_DATA {
18084    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18085    pub time_usec: u64,
18086    #[doc = "X Position"]
18087    pub x: f32,
18088    #[doc = "Y Position"]
18089    pub y: f32,
18090    #[doc = "Z Position"]
18091    pub z: f32,
18092    #[doc = "X Speed"]
18093    pub vx: f32,
18094    #[doc = "Y Speed"]
18095    pub vy: f32,
18096    #[doc = "Z Speed"]
18097    pub vz: f32,
18098    #[doc = "X Acceleration"]
18099    pub ax: f32,
18100    #[doc = "Y Acceleration"]
18101    pub ay: f32,
18102    #[doc = "Z Acceleration"]
18103    pub az: f32,
18104    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
18105    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18106    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18107    pub covariance: [f32; 45],
18108    #[doc = "Class id of the estimator this estimate originated from."]
18109    pub estimator_type: MavEstimatorType,
18110}
18111impl LOCAL_POSITION_NED_COV_DATA {
18112    pub const ENCODED_LEN: usize = 225usize;
18113    pub const DEFAULT: Self = Self {
18114        time_usec: 0_u64,
18115        x: 0.0_f32,
18116        y: 0.0_f32,
18117        z: 0.0_f32,
18118        vx: 0.0_f32,
18119        vy: 0.0_f32,
18120        vz: 0.0_f32,
18121        ax: 0.0_f32,
18122        ay: 0.0_f32,
18123        az: 0.0_f32,
18124        covariance: [0.0_f32; 45usize],
18125        estimator_type: MavEstimatorType::DEFAULT,
18126    };
18127    #[cfg(feature = "arbitrary")]
18128    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18129        use arbitrary::{Arbitrary, Unstructured};
18130        let mut buf = [0u8; 1024];
18131        rng.fill_bytes(&mut buf);
18132        let mut unstructured = Unstructured::new(&buf);
18133        Self::arbitrary(&mut unstructured).unwrap_or_default()
18134    }
18135}
18136impl Default for LOCAL_POSITION_NED_COV_DATA {
18137    fn default() -> Self {
18138        Self::DEFAULT.clone()
18139    }
18140}
18141impl MessageData for LOCAL_POSITION_NED_COV_DATA {
18142    type Message = MavMessage;
18143    const ID: u32 = 64u32;
18144    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
18145    const EXTRA_CRC: u8 = 191u8;
18146    const ENCODED_LEN: usize = 225usize;
18147    fn deser(
18148        _version: MavlinkVersion,
18149        __input: &[u8],
18150    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18151        let avail_len = __input.len();
18152        let mut payload_buf = [0; Self::ENCODED_LEN];
18153        let mut buf = if avail_len < Self::ENCODED_LEN {
18154            payload_buf[0..avail_len].copy_from_slice(__input);
18155            Bytes::new(&payload_buf)
18156        } else {
18157            Bytes::new(__input)
18158        };
18159        let mut __struct = Self::default();
18160        __struct.time_usec = buf.get_u64_le();
18161        __struct.x = buf.get_f32_le();
18162        __struct.y = buf.get_f32_le();
18163        __struct.z = buf.get_f32_le();
18164        __struct.vx = buf.get_f32_le();
18165        __struct.vy = buf.get_f32_le();
18166        __struct.vz = buf.get_f32_le();
18167        __struct.ax = buf.get_f32_le();
18168        __struct.ay = buf.get_f32_le();
18169        __struct.az = buf.get_f32_le();
18170        for v in &mut __struct.covariance {
18171            let val = buf.get_f32_le();
18172            *v = val;
18173        }
18174        let tmp = buf.get_u8();
18175        __struct.estimator_type =
18176            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18177                enum_type: "MavEstimatorType",
18178                value: tmp as u32,
18179            })?;
18180        Ok(__struct)
18181    }
18182    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18183        let mut __tmp = BytesMut::new(bytes);
18184        #[allow(clippy::absurd_extreme_comparisons)]
18185        #[allow(unused_comparisons)]
18186        if __tmp.remaining() < Self::ENCODED_LEN {
18187            panic!(
18188                "buffer is too small (need {} bytes, but got {})",
18189                Self::ENCODED_LEN,
18190                __tmp.remaining(),
18191            )
18192        }
18193        __tmp.put_u64_le(self.time_usec);
18194        __tmp.put_f32_le(self.x);
18195        __tmp.put_f32_le(self.y);
18196        __tmp.put_f32_le(self.z);
18197        __tmp.put_f32_le(self.vx);
18198        __tmp.put_f32_le(self.vy);
18199        __tmp.put_f32_le(self.vz);
18200        __tmp.put_f32_le(self.ax);
18201        __tmp.put_f32_le(self.ay);
18202        __tmp.put_f32_le(self.az);
18203        for val in &self.covariance {
18204            __tmp.put_f32_le(*val);
18205        }
18206        __tmp.put_u8(self.estimator_type as u8);
18207        if matches!(version, MavlinkVersion::V2) {
18208            let len = __tmp.len();
18209            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18210        } else {
18211            __tmp.len()
18212        }
18213    }
18214}
18215#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18216#[doc = ""]
18217#[doc = "ID: 89"]
18218#[derive(Debug, Clone, PartialEq)]
18219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18221#[cfg_attr(feature = "ts", derive(TS))]
18222#[cfg_attr(feature = "ts", ts(export))]
18223pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18224    #[doc = "Timestamp (time since system boot)."]
18225    pub time_boot_ms: u32,
18226    #[doc = "X Position"]
18227    pub x: f32,
18228    #[doc = "Y Position"]
18229    pub y: f32,
18230    #[doc = "Z Position"]
18231    pub z: f32,
18232    #[doc = "Roll"]
18233    pub roll: f32,
18234    #[doc = "Pitch"]
18235    pub pitch: f32,
18236    #[doc = "Yaw"]
18237    pub yaw: f32,
18238}
18239impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18240    pub const ENCODED_LEN: usize = 28usize;
18241    pub const DEFAULT: Self = Self {
18242        time_boot_ms: 0_u32,
18243        x: 0.0_f32,
18244        y: 0.0_f32,
18245        z: 0.0_f32,
18246        roll: 0.0_f32,
18247        pitch: 0.0_f32,
18248        yaw: 0.0_f32,
18249    };
18250    #[cfg(feature = "arbitrary")]
18251    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18252        use arbitrary::{Arbitrary, Unstructured};
18253        let mut buf = [0u8; 1024];
18254        rng.fill_bytes(&mut buf);
18255        let mut unstructured = Unstructured::new(&buf);
18256        Self::arbitrary(&mut unstructured).unwrap_or_default()
18257    }
18258}
18259impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18260    fn default() -> Self {
18261        Self::DEFAULT.clone()
18262    }
18263}
18264impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18265    type Message = MavMessage;
18266    const ID: u32 = 89u32;
18267    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18268    const EXTRA_CRC: u8 = 231u8;
18269    const ENCODED_LEN: usize = 28usize;
18270    fn deser(
18271        _version: MavlinkVersion,
18272        __input: &[u8],
18273    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18274        let avail_len = __input.len();
18275        let mut payload_buf = [0; Self::ENCODED_LEN];
18276        let mut buf = if avail_len < Self::ENCODED_LEN {
18277            payload_buf[0..avail_len].copy_from_slice(__input);
18278            Bytes::new(&payload_buf)
18279        } else {
18280            Bytes::new(__input)
18281        };
18282        let mut __struct = Self::default();
18283        __struct.time_boot_ms = buf.get_u32_le();
18284        __struct.x = buf.get_f32_le();
18285        __struct.y = buf.get_f32_le();
18286        __struct.z = buf.get_f32_le();
18287        __struct.roll = buf.get_f32_le();
18288        __struct.pitch = buf.get_f32_le();
18289        __struct.yaw = buf.get_f32_le();
18290        Ok(__struct)
18291    }
18292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18293        let mut __tmp = BytesMut::new(bytes);
18294        #[allow(clippy::absurd_extreme_comparisons)]
18295        #[allow(unused_comparisons)]
18296        if __tmp.remaining() < Self::ENCODED_LEN {
18297            panic!(
18298                "buffer is too small (need {} bytes, but got {})",
18299                Self::ENCODED_LEN,
18300                __tmp.remaining(),
18301            )
18302        }
18303        __tmp.put_u32_le(self.time_boot_ms);
18304        __tmp.put_f32_le(self.x);
18305        __tmp.put_f32_le(self.y);
18306        __tmp.put_f32_le(self.z);
18307        __tmp.put_f32_le(self.roll);
18308        __tmp.put_f32_le(self.pitch);
18309        __tmp.put_f32_le(self.yaw);
18310        if matches!(version, MavlinkVersion::V2) {
18311            let len = __tmp.len();
18312            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18313        } else {
18314            __tmp.len()
18315        }
18316    }
18317}
18318#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18319#[doc = ""]
18320#[doc = "ID: 268"]
18321#[derive(Debug, Clone, PartialEq)]
18322#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18323#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18324#[cfg_attr(feature = "ts", derive(TS))]
18325#[cfg_attr(feature = "ts", ts(export))]
18326pub struct LOGGING_ACK_DATA {
18327    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18328    pub sequence: u16,
18329    #[doc = "system ID of the target"]
18330    pub target_system: u8,
18331    #[doc = "component ID of the target"]
18332    pub target_component: u8,
18333}
18334impl LOGGING_ACK_DATA {
18335    pub const ENCODED_LEN: usize = 4usize;
18336    pub const DEFAULT: Self = Self {
18337        sequence: 0_u16,
18338        target_system: 0_u8,
18339        target_component: 0_u8,
18340    };
18341    #[cfg(feature = "arbitrary")]
18342    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18343        use arbitrary::{Arbitrary, Unstructured};
18344        let mut buf = [0u8; 1024];
18345        rng.fill_bytes(&mut buf);
18346        let mut unstructured = Unstructured::new(&buf);
18347        Self::arbitrary(&mut unstructured).unwrap_or_default()
18348    }
18349}
18350impl Default for LOGGING_ACK_DATA {
18351    fn default() -> Self {
18352        Self::DEFAULT.clone()
18353    }
18354}
18355impl MessageData for LOGGING_ACK_DATA {
18356    type Message = MavMessage;
18357    const ID: u32 = 268u32;
18358    const NAME: &'static str = "LOGGING_ACK";
18359    const EXTRA_CRC: u8 = 14u8;
18360    const ENCODED_LEN: usize = 4usize;
18361    fn deser(
18362        _version: MavlinkVersion,
18363        __input: &[u8],
18364    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18365        let avail_len = __input.len();
18366        let mut payload_buf = [0; Self::ENCODED_LEN];
18367        let mut buf = if avail_len < Self::ENCODED_LEN {
18368            payload_buf[0..avail_len].copy_from_slice(__input);
18369            Bytes::new(&payload_buf)
18370        } else {
18371            Bytes::new(__input)
18372        };
18373        let mut __struct = Self::default();
18374        __struct.sequence = buf.get_u16_le();
18375        __struct.target_system = buf.get_u8();
18376        __struct.target_component = buf.get_u8();
18377        Ok(__struct)
18378    }
18379    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18380        let mut __tmp = BytesMut::new(bytes);
18381        #[allow(clippy::absurd_extreme_comparisons)]
18382        #[allow(unused_comparisons)]
18383        if __tmp.remaining() < Self::ENCODED_LEN {
18384            panic!(
18385                "buffer is too small (need {} bytes, but got {})",
18386                Self::ENCODED_LEN,
18387                __tmp.remaining(),
18388            )
18389        }
18390        __tmp.put_u16_le(self.sequence);
18391        __tmp.put_u8(self.target_system);
18392        __tmp.put_u8(self.target_component);
18393        if matches!(version, MavlinkVersion::V2) {
18394            let len = __tmp.len();
18395            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18396        } else {
18397            __tmp.len()
18398        }
18399    }
18400}
18401#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18402#[doc = ""]
18403#[doc = "ID: 266"]
18404#[derive(Debug, Clone, PartialEq)]
18405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18407#[cfg_attr(feature = "ts", derive(TS))]
18408#[cfg_attr(feature = "ts", ts(export))]
18409pub struct LOGGING_DATA_DATA {
18410    #[doc = "sequence number (can wrap)"]
18411    pub sequence: u16,
18412    #[doc = "system ID of the target"]
18413    pub target_system: u8,
18414    #[doc = "component ID of the target"]
18415    pub target_component: u8,
18416    #[doc = "data length"]
18417    pub length: u8,
18418    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18419    pub first_message_offset: u8,
18420    #[doc = "logged data"]
18421    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18422    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18423    pub data: [u8; 249],
18424}
18425impl LOGGING_DATA_DATA {
18426    pub const ENCODED_LEN: usize = 255usize;
18427    pub const DEFAULT: Self = Self {
18428        sequence: 0_u16,
18429        target_system: 0_u8,
18430        target_component: 0_u8,
18431        length: 0_u8,
18432        first_message_offset: 0_u8,
18433        data: [0_u8; 249usize],
18434    };
18435    #[cfg(feature = "arbitrary")]
18436    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18437        use arbitrary::{Arbitrary, Unstructured};
18438        let mut buf = [0u8; 1024];
18439        rng.fill_bytes(&mut buf);
18440        let mut unstructured = Unstructured::new(&buf);
18441        Self::arbitrary(&mut unstructured).unwrap_or_default()
18442    }
18443}
18444impl Default for LOGGING_DATA_DATA {
18445    fn default() -> Self {
18446        Self::DEFAULT.clone()
18447    }
18448}
18449impl MessageData for LOGGING_DATA_DATA {
18450    type Message = MavMessage;
18451    const ID: u32 = 266u32;
18452    const NAME: &'static str = "LOGGING_DATA";
18453    const EXTRA_CRC: u8 = 193u8;
18454    const ENCODED_LEN: usize = 255usize;
18455    fn deser(
18456        _version: MavlinkVersion,
18457        __input: &[u8],
18458    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18459        let avail_len = __input.len();
18460        let mut payload_buf = [0; Self::ENCODED_LEN];
18461        let mut buf = if avail_len < Self::ENCODED_LEN {
18462            payload_buf[0..avail_len].copy_from_slice(__input);
18463            Bytes::new(&payload_buf)
18464        } else {
18465            Bytes::new(__input)
18466        };
18467        let mut __struct = Self::default();
18468        __struct.sequence = buf.get_u16_le();
18469        __struct.target_system = buf.get_u8();
18470        __struct.target_component = buf.get_u8();
18471        __struct.length = buf.get_u8();
18472        __struct.first_message_offset = buf.get_u8();
18473        for v in &mut __struct.data {
18474            let val = buf.get_u8();
18475            *v = val;
18476        }
18477        Ok(__struct)
18478    }
18479    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18480        let mut __tmp = BytesMut::new(bytes);
18481        #[allow(clippy::absurd_extreme_comparisons)]
18482        #[allow(unused_comparisons)]
18483        if __tmp.remaining() < Self::ENCODED_LEN {
18484            panic!(
18485                "buffer is too small (need {} bytes, but got {})",
18486                Self::ENCODED_LEN,
18487                __tmp.remaining(),
18488            )
18489        }
18490        __tmp.put_u16_le(self.sequence);
18491        __tmp.put_u8(self.target_system);
18492        __tmp.put_u8(self.target_component);
18493        __tmp.put_u8(self.length);
18494        __tmp.put_u8(self.first_message_offset);
18495        for val in &self.data {
18496            __tmp.put_u8(*val);
18497        }
18498        if matches!(version, MavlinkVersion::V2) {
18499            let len = __tmp.len();
18500            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18501        } else {
18502            __tmp.len()
18503        }
18504    }
18505}
18506#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18507#[doc = ""]
18508#[doc = "ID: 267"]
18509#[derive(Debug, Clone, PartialEq)]
18510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18512#[cfg_attr(feature = "ts", derive(TS))]
18513#[cfg_attr(feature = "ts", ts(export))]
18514pub struct LOGGING_DATA_ACKED_DATA {
18515    #[doc = "sequence number (can wrap)"]
18516    pub sequence: u16,
18517    #[doc = "system ID of the target"]
18518    pub target_system: u8,
18519    #[doc = "component ID of the target"]
18520    pub target_component: u8,
18521    #[doc = "data length"]
18522    pub length: u8,
18523    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18524    pub first_message_offset: u8,
18525    #[doc = "logged data"]
18526    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18527    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18528    pub data: [u8; 249],
18529}
18530impl LOGGING_DATA_ACKED_DATA {
18531    pub const ENCODED_LEN: usize = 255usize;
18532    pub const DEFAULT: Self = Self {
18533        sequence: 0_u16,
18534        target_system: 0_u8,
18535        target_component: 0_u8,
18536        length: 0_u8,
18537        first_message_offset: 0_u8,
18538        data: [0_u8; 249usize],
18539    };
18540    #[cfg(feature = "arbitrary")]
18541    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18542        use arbitrary::{Arbitrary, Unstructured};
18543        let mut buf = [0u8; 1024];
18544        rng.fill_bytes(&mut buf);
18545        let mut unstructured = Unstructured::new(&buf);
18546        Self::arbitrary(&mut unstructured).unwrap_or_default()
18547    }
18548}
18549impl Default for LOGGING_DATA_ACKED_DATA {
18550    fn default() -> Self {
18551        Self::DEFAULT.clone()
18552    }
18553}
18554impl MessageData for LOGGING_DATA_ACKED_DATA {
18555    type Message = MavMessage;
18556    const ID: u32 = 267u32;
18557    const NAME: &'static str = "LOGGING_DATA_ACKED";
18558    const EXTRA_CRC: u8 = 35u8;
18559    const ENCODED_LEN: usize = 255usize;
18560    fn deser(
18561        _version: MavlinkVersion,
18562        __input: &[u8],
18563    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18564        let avail_len = __input.len();
18565        let mut payload_buf = [0; Self::ENCODED_LEN];
18566        let mut buf = if avail_len < Self::ENCODED_LEN {
18567            payload_buf[0..avail_len].copy_from_slice(__input);
18568            Bytes::new(&payload_buf)
18569        } else {
18570            Bytes::new(__input)
18571        };
18572        let mut __struct = Self::default();
18573        __struct.sequence = buf.get_u16_le();
18574        __struct.target_system = buf.get_u8();
18575        __struct.target_component = buf.get_u8();
18576        __struct.length = buf.get_u8();
18577        __struct.first_message_offset = buf.get_u8();
18578        for v in &mut __struct.data {
18579            let val = buf.get_u8();
18580            *v = val;
18581        }
18582        Ok(__struct)
18583    }
18584    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18585        let mut __tmp = BytesMut::new(bytes);
18586        #[allow(clippy::absurd_extreme_comparisons)]
18587        #[allow(unused_comparisons)]
18588        if __tmp.remaining() < Self::ENCODED_LEN {
18589            panic!(
18590                "buffer is too small (need {} bytes, but got {})",
18591                Self::ENCODED_LEN,
18592                __tmp.remaining(),
18593            )
18594        }
18595        __tmp.put_u16_le(self.sequence);
18596        __tmp.put_u8(self.target_system);
18597        __tmp.put_u8(self.target_component);
18598        __tmp.put_u8(self.length);
18599        __tmp.put_u8(self.first_message_offset);
18600        for val in &self.data {
18601            __tmp.put_u8(*val);
18602        }
18603        if matches!(version, MavlinkVersion::V2) {
18604            let len = __tmp.len();
18605            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18606        } else {
18607            __tmp.len()
18608        }
18609    }
18610}
18611#[doc = "Reply to LOG_REQUEST_DATA."]
18612#[doc = ""]
18613#[doc = "ID: 120"]
18614#[derive(Debug, Clone, PartialEq)]
18615#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18616#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18617#[cfg_attr(feature = "ts", derive(TS))]
18618#[cfg_attr(feature = "ts", ts(export))]
18619pub struct LOG_DATA_DATA {
18620    #[doc = "Offset into the log"]
18621    pub ofs: u32,
18622    #[doc = "Log id (from LOG_ENTRY reply)"]
18623    pub id: u16,
18624    #[doc = "Number of bytes (zero for end of log)"]
18625    pub count: u8,
18626    #[doc = "log data"]
18627    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18628    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18629    pub data: [u8; 90],
18630}
18631impl LOG_DATA_DATA {
18632    pub const ENCODED_LEN: usize = 97usize;
18633    pub const DEFAULT: Self = Self {
18634        ofs: 0_u32,
18635        id: 0_u16,
18636        count: 0_u8,
18637        data: [0_u8; 90usize],
18638    };
18639    #[cfg(feature = "arbitrary")]
18640    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18641        use arbitrary::{Arbitrary, Unstructured};
18642        let mut buf = [0u8; 1024];
18643        rng.fill_bytes(&mut buf);
18644        let mut unstructured = Unstructured::new(&buf);
18645        Self::arbitrary(&mut unstructured).unwrap_or_default()
18646    }
18647}
18648impl Default for LOG_DATA_DATA {
18649    fn default() -> Self {
18650        Self::DEFAULT.clone()
18651    }
18652}
18653impl MessageData for LOG_DATA_DATA {
18654    type Message = MavMessage;
18655    const ID: u32 = 120u32;
18656    const NAME: &'static str = "LOG_DATA";
18657    const EXTRA_CRC: u8 = 134u8;
18658    const ENCODED_LEN: usize = 97usize;
18659    fn deser(
18660        _version: MavlinkVersion,
18661        __input: &[u8],
18662    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18663        let avail_len = __input.len();
18664        let mut payload_buf = [0; Self::ENCODED_LEN];
18665        let mut buf = if avail_len < Self::ENCODED_LEN {
18666            payload_buf[0..avail_len].copy_from_slice(__input);
18667            Bytes::new(&payload_buf)
18668        } else {
18669            Bytes::new(__input)
18670        };
18671        let mut __struct = Self::default();
18672        __struct.ofs = buf.get_u32_le();
18673        __struct.id = buf.get_u16_le();
18674        __struct.count = buf.get_u8();
18675        for v in &mut __struct.data {
18676            let val = buf.get_u8();
18677            *v = val;
18678        }
18679        Ok(__struct)
18680    }
18681    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18682        let mut __tmp = BytesMut::new(bytes);
18683        #[allow(clippy::absurd_extreme_comparisons)]
18684        #[allow(unused_comparisons)]
18685        if __tmp.remaining() < Self::ENCODED_LEN {
18686            panic!(
18687                "buffer is too small (need {} bytes, but got {})",
18688                Self::ENCODED_LEN,
18689                __tmp.remaining(),
18690            )
18691        }
18692        __tmp.put_u32_le(self.ofs);
18693        __tmp.put_u16_le(self.id);
18694        __tmp.put_u8(self.count);
18695        for val in &self.data {
18696            __tmp.put_u8(*val);
18697        }
18698        if matches!(version, MavlinkVersion::V2) {
18699            let len = __tmp.len();
18700            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18701        } else {
18702            __tmp.len()
18703        }
18704    }
18705}
18706#[doc = "Reply to LOG_REQUEST_LIST."]
18707#[doc = ""]
18708#[doc = "ID: 118"]
18709#[derive(Debug, Clone, PartialEq)]
18710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18712#[cfg_attr(feature = "ts", derive(TS))]
18713#[cfg_attr(feature = "ts", ts(export))]
18714pub struct LOG_ENTRY_DATA {
18715    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18716    pub time_utc: u32,
18717    #[doc = "Size of the log (may be approximate)"]
18718    pub size: u32,
18719    #[doc = "Log id"]
18720    pub id: u16,
18721    #[doc = "Total number of logs"]
18722    pub num_logs: u16,
18723    #[doc = "High log number"]
18724    pub last_log_num: u16,
18725}
18726impl LOG_ENTRY_DATA {
18727    pub const ENCODED_LEN: usize = 14usize;
18728    pub const DEFAULT: Self = Self {
18729        time_utc: 0_u32,
18730        size: 0_u32,
18731        id: 0_u16,
18732        num_logs: 0_u16,
18733        last_log_num: 0_u16,
18734    };
18735    #[cfg(feature = "arbitrary")]
18736    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18737        use arbitrary::{Arbitrary, Unstructured};
18738        let mut buf = [0u8; 1024];
18739        rng.fill_bytes(&mut buf);
18740        let mut unstructured = Unstructured::new(&buf);
18741        Self::arbitrary(&mut unstructured).unwrap_or_default()
18742    }
18743}
18744impl Default for LOG_ENTRY_DATA {
18745    fn default() -> Self {
18746        Self::DEFAULT.clone()
18747    }
18748}
18749impl MessageData for LOG_ENTRY_DATA {
18750    type Message = MavMessage;
18751    const ID: u32 = 118u32;
18752    const NAME: &'static str = "LOG_ENTRY";
18753    const EXTRA_CRC: u8 = 56u8;
18754    const ENCODED_LEN: usize = 14usize;
18755    fn deser(
18756        _version: MavlinkVersion,
18757        __input: &[u8],
18758    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18759        let avail_len = __input.len();
18760        let mut payload_buf = [0; Self::ENCODED_LEN];
18761        let mut buf = if avail_len < Self::ENCODED_LEN {
18762            payload_buf[0..avail_len].copy_from_slice(__input);
18763            Bytes::new(&payload_buf)
18764        } else {
18765            Bytes::new(__input)
18766        };
18767        let mut __struct = Self::default();
18768        __struct.time_utc = buf.get_u32_le();
18769        __struct.size = buf.get_u32_le();
18770        __struct.id = buf.get_u16_le();
18771        __struct.num_logs = buf.get_u16_le();
18772        __struct.last_log_num = buf.get_u16_le();
18773        Ok(__struct)
18774    }
18775    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18776        let mut __tmp = BytesMut::new(bytes);
18777        #[allow(clippy::absurd_extreme_comparisons)]
18778        #[allow(unused_comparisons)]
18779        if __tmp.remaining() < Self::ENCODED_LEN {
18780            panic!(
18781                "buffer is too small (need {} bytes, but got {})",
18782                Self::ENCODED_LEN,
18783                __tmp.remaining(),
18784            )
18785        }
18786        __tmp.put_u32_le(self.time_utc);
18787        __tmp.put_u32_le(self.size);
18788        __tmp.put_u16_le(self.id);
18789        __tmp.put_u16_le(self.num_logs);
18790        __tmp.put_u16_le(self.last_log_num);
18791        if matches!(version, MavlinkVersion::V2) {
18792            let len = __tmp.len();
18793            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18794        } else {
18795            __tmp.len()
18796        }
18797    }
18798}
18799#[doc = "Erase all logs."]
18800#[doc = ""]
18801#[doc = "ID: 121"]
18802#[derive(Debug, Clone, PartialEq)]
18803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18805#[cfg_attr(feature = "ts", derive(TS))]
18806#[cfg_attr(feature = "ts", ts(export))]
18807pub struct LOG_ERASE_DATA {
18808    #[doc = "System ID"]
18809    pub target_system: u8,
18810    #[doc = "Component ID"]
18811    pub target_component: u8,
18812}
18813impl LOG_ERASE_DATA {
18814    pub const ENCODED_LEN: usize = 2usize;
18815    pub const DEFAULT: Self = Self {
18816        target_system: 0_u8,
18817        target_component: 0_u8,
18818    };
18819    #[cfg(feature = "arbitrary")]
18820    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18821        use arbitrary::{Arbitrary, Unstructured};
18822        let mut buf = [0u8; 1024];
18823        rng.fill_bytes(&mut buf);
18824        let mut unstructured = Unstructured::new(&buf);
18825        Self::arbitrary(&mut unstructured).unwrap_or_default()
18826    }
18827}
18828impl Default for LOG_ERASE_DATA {
18829    fn default() -> Self {
18830        Self::DEFAULT.clone()
18831    }
18832}
18833impl MessageData for LOG_ERASE_DATA {
18834    type Message = MavMessage;
18835    const ID: u32 = 121u32;
18836    const NAME: &'static str = "LOG_ERASE";
18837    const EXTRA_CRC: u8 = 237u8;
18838    const ENCODED_LEN: usize = 2usize;
18839    fn deser(
18840        _version: MavlinkVersion,
18841        __input: &[u8],
18842    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18843        let avail_len = __input.len();
18844        let mut payload_buf = [0; Self::ENCODED_LEN];
18845        let mut buf = if avail_len < Self::ENCODED_LEN {
18846            payload_buf[0..avail_len].copy_from_slice(__input);
18847            Bytes::new(&payload_buf)
18848        } else {
18849            Bytes::new(__input)
18850        };
18851        let mut __struct = Self::default();
18852        __struct.target_system = buf.get_u8();
18853        __struct.target_component = buf.get_u8();
18854        Ok(__struct)
18855    }
18856    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18857        let mut __tmp = BytesMut::new(bytes);
18858        #[allow(clippy::absurd_extreme_comparisons)]
18859        #[allow(unused_comparisons)]
18860        if __tmp.remaining() < Self::ENCODED_LEN {
18861            panic!(
18862                "buffer is too small (need {} bytes, but got {})",
18863                Self::ENCODED_LEN,
18864                __tmp.remaining(),
18865            )
18866        }
18867        __tmp.put_u8(self.target_system);
18868        __tmp.put_u8(self.target_component);
18869        if matches!(version, MavlinkVersion::V2) {
18870            let len = __tmp.len();
18871            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18872        } else {
18873            __tmp.len()
18874        }
18875    }
18876}
18877#[doc = "Request a chunk of a log."]
18878#[doc = ""]
18879#[doc = "ID: 119"]
18880#[derive(Debug, Clone, PartialEq)]
18881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18882#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18883#[cfg_attr(feature = "ts", derive(TS))]
18884#[cfg_attr(feature = "ts", ts(export))]
18885pub struct LOG_REQUEST_DATA_DATA {
18886    #[doc = "Offset into the log"]
18887    pub ofs: u32,
18888    #[doc = "Number of bytes"]
18889    pub count: u32,
18890    #[doc = "Log id (from LOG_ENTRY reply)"]
18891    pub id: u16,
18892    #[doc = "System ID"]
18893    pub target_system: u8,
18894    #[doc = "Component ID"]
18895    pub target_component: u8,
18896}
18897impl LOG_REQUEST_DATA_DATA {
18898    pub const ENCODED_LEN: usize = 12usize;
18899    pub const DEFAULT: Self = Self {
18900        ofs: 0_u32,
18901        count: 0_u32,
18902        id: 0_u16,
18903        target_system: 0_u8,
18904        target_component: 0_u8,
18905    };
18906    #[cfg(feature = "arbitrary")]
18907    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18908        use arbitrary::{Arbitrary, Unstructured};
18909        let mut buf = [0u8; 1024];
18910        rng.fill_bytes(&mut buf);
18911        let mut unstructured = Unstructured::new(&buf);
18912        Self::arbitrary(&mut unstructured).unwrap_or_default()
18913    }
18914}
18915impl Default for LOG_REQUEST_DATA_DATA {
18916    fn default() -> Self {
18917        Self::DEFAULT.clone()
18918    }
18919}
18920impl MessageData for LOG_REQUEST_DATA_DATA {
18921    type Message = MavMessage;
18922    const ID: u32 = 119u32;
18923    const NAME: &'static str = "LOG_REQUEST_DATA";
18924    const EXTRA_CRC: u8 = 116u8;
18925    const ENCODED_LEN: usize = 12usize;
18926    fn deser(
18927        _version: MavlinkVersion,
18928        __input: &[u8],
18929    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18930        let avail_len = __input.len();
18931        let mut payload_buf = [0; Self::ENCODED_LEN];
18932        let mut buf = if avail_len < Self::ENCODED_LEN {
18933            payload_buf[0..avail_len].copy_from_slice(__input);
18934            Bytes::new(&payload_buf)
18935        } else {
18936            Bytes::new(__input)
18937        };
18938        let mut __struct = Self::default();
18939        __struct.ofs = buf.get_u32_le();
18940        __struct.count = buf.get_u32_le();
18941        __struct.id = buf.get_u16_le();
18942        __struct.target_system = buf.get_u8();
18943        __struct.target_component = buf.get_u8();
18944        Ok(__struct)
18945    }
18946    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18947        let mut __tmp = BytesMut::new(bytes);
18948        #[allow(clippy::absurd_extreme_comparisons)]
18949        #[allow(unused_comparisons)]
18950        if __tmp.remaining() < Self::ENCODED_LEN {
18951            panic!(
18952                "buffer is too small (need {} bytes, but got {})",
18953                Self::ENCODED_LEN,
18954                __tmp.remaining(),
18955            )
18956        }
18957        __tmp.put_u32_le(self.ofs);
18958        __tmp.put_u32_le(self.count);
18959        __tmp.put_u16_le(self.id);
18960        __tmp.put_u8(self.target_system);
18961        __tmp.put_u8(self.target_component);
18962        if matches!(version, MavlinkVersion::V2) {
18963            let len = __tmp.len();
18964            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18965        } else {
18966            __tmp.len()
18967        }
18968    }
18969}
18970#[doc = "Stop log transfer and resume normal logging."]
18971#[doc = ""]
18972#[doc = "ID: 122"]
18973#[derive(Debug, Clone, PartialEq)]
18974#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18976#[cfg_attr(feature = "ts", derive(TS))]
18977#[cfg_attr(feature = "ts", ts(export))]
18978pub struct LOG_REQUEST_END_DATA {
18979    #[doc = "System ID"]
18980    pub target_system: u8,
18981    #[doc = "Component ID"]
18982    pub target_component: u8,
18983}
18984impl LOG_REQUEST_END_DATA {
18985    pub const ENCODED_LEN: usize = 2usize;
18986    pub const DEFAULT: Self = Self {
18987        target_system: 0_u8,
18988        target_component: 0_u8,
18989    };
18990    #[cfg(feature = "arbitrary")]
18991    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18992        use arbitrary::{Arbitrary, Unstructured};
18993        let mut buf = [0u8; 1024];
18994        rng.fill_bytes(&mut buf);
18995        let mut unstructured = Unstructured::new(&buf);
18996        Self::arbitrary(&mut unstructured).unwrap_or_default()
18997    }
18998}
18999impl Default for LOG_REQUEST_END_DATA {
19000    fn default() -> Self {
19001        Self::DEFAULT.clone()
19002    }
19003}
19004impl MessageData for LOG_REQUEST_END_DATA {
19005    type Message = MavMessage;
19006    const ID: u32 = 122u32;
19007    const NAME: &'static str = "LOG_REQUEST_END";
19008    const EXTRA_CRC: u8 = 203u8;
19009    const ENCODED_LEN: usize = 2usize;
19010    fn deser(
19011        _version: MavlinkVersion,
19012        __input: &[u8],
19013    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19014        let avail_len = __input.len();
19015        let mut payload_buf = [0; Self::ENCODED_LEN];
19016        let mut buf = if avail_len < Self::ENCODED_LEN {
19017            payload_buf[0..avail_len].copy_from_slice(__input);
19018            Bytes::new(&payload_buf)
19019        } else {
19020            Bytes::new(__input)
19021        };
19022        let mut __struct = Self::default();
19023        __struct.target_system = buf.get_u8();
19024        __struct.target_component = buf.get_u8();
19025        Ok(__struct)
19026    }
19027    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19028        let mut __tmp = BytesMut::new(bytes);
19029        #[allow(clippy::absurd_extreme_comparisons)]
19030        #[allow(unused_comparisons)]
19031        if __tmp.remaining() < Self::ENCODED_LEN {
19032            panic!(
19033                "buffer is too small (need {} bytes, but got {})",
19034                Self::ENCODED_LEN,
19035                __tmp.remaining(),
19036            )
19037        }
19038        __tmp.put_u8(self.target_system);
19039        __tmp.put_u8(self.target_component);
19040        if matches!(version, MavlinkVersion::V2) {
19041            let len = __tmp.len();
19042            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19043        } else {
19044            __tmp.len()
19045        }
19046    }
19047}
19048#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
19049#[doc = ""]
19050#[doc = "ID: 117"]
19051#[derive(Debug, Clone, PartialEq)]
19052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19054#[cfg_attr(feature = "ts", derive(TS))]
19055#[cfg_attr(feature = "ts", ts(export))]
19056pub struct LOG_REQUEST_LIST_DATA {
19057    #[doc = "First log id (0 for first available)"]
19058    pub start: u16,
19059    #[doc = "Last log id (0xffff for last available)"]
19060    pub end: u16,
19061    #[doc = "System ID"]
19062    pub target_system: u8,
19063    #[doc = "Component ID"]
19064    pub target_component: u8,
19065}
19066impl LOG_REQUEST_LIST_DATA {
19067    pub const ENCODED_LEN: usize = 6usize;
19068    pub const DEFAULT: Self = Self {
19069        start: 0_u16,
19070        end: 0_u16,
19071        target_system: 0_u8,
19072        target_component: 0_u8,
19073    };
19074    #[cfg(feature = "arbitrary")]
19075    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19076        use arbitrary::{Arbitrary, Unstructured};
19077        let mut buf = [0u8; 1024];
19078        rng.fill_bytes(&mut buf);
19079        let mut unstructured = Unstructured::new(&buf);
19080        Self::arbitrary(&mut unstructured).unwrap_or_default()
19081    }
19082}
19083impl Default for LOG_REQUEST_LIST_DATA {
19084    fn default() -> Self {
19085        Self::DEFAULT.clone()
19086    }
19087}
19088impl MessageData for LOG_REQUEST_LIST_DATA {
19089    type Message = MavMessage;
19090    const ID: u32 = 117u32;
19091    const NAME: &'static str = "LOG_REQUEST_LIST";
19092    const EXTRA_CRC: u8 = 128u8;
19093    const ENCODED_LEN: usize = 6usize;
19094    fn deser(
19095        _version: MavlinkVersion,
19096        __input: &[u8],
19097    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19098        let avail_len = __input.len();
19099        let mut payload_buf = [0; Self::ENCODED_LEN];
19100        let mut buf = if avail_len < Self::ENCODED_LEN {
19101            payload_buf[0..avail_len].copy_from_slice(__input);
19102            Bytes::new(&payload_buf)
19103        } else {
19104            Bytes::new(__input)
19105        };
19106        let mut __struct = Self::default();
19107        __struct.start = buf.get_u16_le();
19108        __struct.end = buf.get_u16_le();
19109        __struct.target_system = buf.get_u8();
19110        __struct.target_component = buf.get_u8();
19111        Ok(__struct)
19112    }
19113    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19114        let mut __tmp = BytesMut::new(bytes);
19115        #[allow(clippy::absurd_extreme_comparisons)]
19116        #[allow(unused_comparisons)]
19117        if __tmp.remaining() < Self::ENCODED_LEN {
19118            panic!(
19119                "buffer is too small (need {} bytes, but got {})",
19120                Self::ENCODED_LEN,
19121                __tmp.remaining(),
19122            )
19123        }
19124        __tmp.put_u16_le(self.start);
19125        __tmp.put_u16_le(self.end);
19126        __tmp.put_u8(self.target_system);
19127        __tmp.put_u8(self.target_component);
19128        if matches!(version, MavlinkVersion::V2) {
19129            let len = __tmp.len();
19130            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19131        } else {
19132            __tmp.len()
19133        }
19134    }
19135}
19136#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
19137#[doc = ""]
19138#[doc = "ID: 192"]
19139#[derive(Debug, Clone, PartialEq)]
19140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19141#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19142#[cfg_attr(feature = "ts", derive(TS))]
19143#[cfg_attr(feature = "ts", ts(export))]
19144pub struct MAG_CAL_REPORT_DATA {
19145    #[doc = "RMS milligauss residuals."]
19146    pub fitness: f32,
19147    #[doc = "X offset."]
19148    pub ofs_x: f32,
19149    #[doc = "Y offset."]
19150    pub ofs_y: f32,
19151    #[doc = "Z offset."]
19152    pub ofs_z: f32,
19153    #[doc = "X diagonal (matrix 11)."]
19154    pub diag_x: f32,
19155    #[doc = "Y diagonal (matrix 22)."]
19156    pub diag_y: f32,
19157    #[doc = "Z diagonal (matrix 33)."]
19158    pub diag_z: f32,
19159    #[doc = "X off-diagonal (matrix 12 and 21)."]
19160    pub offdiag_x: f32,
19161    #[doc = "Y off-diagonal (matrix 13 and 31)."]
19162    pub offdiag_y: f32,
19163    #[doc = "Z off-diagonal (matrix 32 and 23)."]
19164    pub offdiag_z: f32,
19165    #[doc = "Compass being calibrated."]
19166    pub compass_id: u8,
19167    #[doc = "Bitmask of compasses being calibrated."]
19168    pub cal_mask: u8,
19169    #[doc = "Calibration Status."]
19170    pub cal_status: MagCalStatus,
19171    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
19172    pub autosaved: u8,
19173    #[doc = "Confidence in orientation (higher is better)."]
19174    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19175    pub orientation_confidence: f32,
19176    #[doc = "orientation before calibration."]
19177    #[cfg_attr(feature = "serde", serde(default))]
19178    pub old_orientation: MavSensorOrientation,
19179    #[doc = "orientation after calibration."]
19180    #[cfg_attr(feature = "serde", serde(default))]
19181    pub new_orientation: MavSensorOrientation,
19182    #[doc = "field radius correction factor"]
19183    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19184    pub scale_factor: f32,
19185}
19186impl MAG_CAL_REPORT_DATA {
19187    pub const ENCODED_LEN: usize = 54usize;
19188    pub const DEFAULT: Self = Self {
19189        fitness: 0.0_f32,
19190        ofs_x: 0.0_f32,
19191        ofs_y: 0.0_f32,
19192        ofs_z: 0.0_f32,
19193        diag_x: 0.0_f32,
19194        diag_y: 0.0_f32,
19195        diag_z: 0.0_f32,
19196        offdiag_x: 0.0_f32,
19197        offdiag_y: 0.0_f32,
19198        offdiag_z: 0.0_f32,
19199        compass_id: 0_u8,
19200        cal_mask: 0_u8,
19201        cal_status: MagCalStatus::DEFAULT,
19202        autosaved: 0_u8,
19203        orientation_confidence: 0.0_f32,
19204        old_orientation: MavSensorOrientation::DEFAULT,
19205        new_orientation: MavSensorOrientation::DEFAULT,
19206        scale_factor: 0.0_f32,
19207    };
19208    #[cfg(feature = "arbitrary")]
19209    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19210        use arbitrary::{Arbitrary, Unstructured};
19211        let mut buf = [0u8; 1024];
19212        rng.fill_bytes(&mut buf);
19213        let mut unstructured = Unstructured::new(&buf);
19214        Self::arbitrary(&mut unstructured).unwrap_or_default()
19215    }
19216}
19217impl Default for MAG_CAL_REPORT_DATA {
19218    fn default() -> Self {
19219        Self::DEFAULT.clone()
19220    }
19221}
19222impl MessageData for MAG_CAL_REPORT_DATA {
19223    type Message = MavMessage;
19224    const ID: u32 = 192u32;
19225    const NAME: &'static str = "MAG_CAL_REPORT";
19226    const EXTRA_CRC: u8 = 36u8;
19227    const ENCODED_LEN: usize = 54usize;
19228    fn deser(
19229        _version: MavlinkVersion,
19230        __input: &[u8],
19231    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19232        let avail_len = __input.len();
19233        let mut payload_buf = [0; Self::ENCODED_LEN];
19234        let mut buf = if avail_len < Self::ENCODED_LEN {
19235            payload_buf[0..avail_len].copy_from_slice(__input);
19236            Bytes::new(&payload_buf)
19237        } else {
19238            Bytes::new(__input)
19239        };
19240        let mut __struct = Self::default();
19241        __struct.fitness = buf.get_f32_le();
19242        __struct.ofs_x = buf.get_f32_le();
19243        __struct.ofs_y = buf.get_f32_le();
19244        __struct.ofs_z = buf.get_f32_le();
19245        __struct.diag_x = buf.get_f32_le();
19246        __struct.diag_y = buf.get_f32_le();
19247        __struct.diag_z = buf.get_f32_le();
19248        __struct.offdiag_x = buf.get_f32_le();
19249        __struct.offdiag_y = buf.get_f32_le();
19250        __struct.offdiag_z = buf.get_f32_le();
19251        __struct.compass_id = buf.get_u8();
19252        __struct.cal_mask = buf.get_u8();
19253        let tmp = buf.get_u8();
19254        __struct.cal_status =
19255            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19256                enum_type: "MagCalStatus",
19257                value: tmp as u32,
19258            })?;
19259        __struct.autosaved = buf.get_u8();
19260        __struct.orientation_confidence = buf.get_f32_le();
19261        let tmp = buf.get_u8();
19262        __struct.old_orientation =
19263            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19264                enum_type: "MavSensorOrientation",
19265                value: tmp as u32,
19266            })?;
19267        let tmp = buf.get_u8();
19268        __struct.new_orientation =
19269            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19270                enum_type: "MavSensorOrientation",
19271                value: tmp as u32,
19272            })?;
19273        __struct.scale_factor = buf.get_f32_le();
19274        Ok(__struct)
19275    }
19276    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19277        let mut __tmp = BytesMut::new(bytes);
19278        #[allow(clippy::absurd_extreme_comparisons)]
19279        #[allow(unused_comparisons)]
19280        if __tmp.remaining() < Self::ENCODED_LEN {
19281            panic!(
19282                "buffer is too small (need {} bytes, but got {})",
19283                Self::ENCODED_LEN,
19284                __tmp.remaining(),
19285            )
19286        }
19287        __tmp.put_f32_le(self.fitness);
19288        __tmp.put_f32_le(self.ofs_x);
19289        __tmp.put_f32_le(self.ofs_y);
19290        __tmp.put_f32_le(self.ofs_z);
19291        __tmp.put_f32_le(self.diag_x);
19292        __tmp.put_f32_le(self.diag_y);
19293        __tmp.put_f32_le(self.diag_z);
19294        __tmp.put_f32_le(self.offdiag_x);
19295        __tmp.put_f32_le(self.offdiag_y);
19296        __tmp.put_f32_le(self.offdiag_z);
19297        __tmp.put_u8(self.compass_id);
19298        __tmp.put_u8(self.cal_mask);
19299        __tmp.put_u8(self.cal_status as u8);
19300        __tmp.put_u8(self.autosaved);
19301        if matches!(version, MavlinkVersion::V2) {
19302            __tmp.put_f32_le(self.orientation_confidence);
19303            __tmp.put_u8(self.old_orientation as u8);
19304            __tmp.put_u8(self.new_orientation as u8);
19305            __tmp.put_f32_le(self.scale_factor);
19306            let len = __tmp.len();
19307            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19308        } else {
19309            __tmp.len()
19310        }
19311    }
19312}
19313#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19314#[doc = ""]
19315#[doc = "ID: 69"]
19316#[derive(Debug, Clone, PartialEq)]
19317#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19319#[cfg_attr(feature = "ts", derive(TS))]
19320#[cfg_attr(feature = "ts", ts(export))]
19321pub struct MANUAL_CONTROL_DATA {
19322    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19323    pub x: i16,
19324    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19325    pub y: i16,
19326    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19327    pub z: i16,
19328    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19329    pub r: i16,
19330    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19331    pub buttons: u16,
19332    #[doc = "The system to be controlled."]
19333    pub target: u8,
19334    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19335    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19336    pub buttons2: u16,
19337    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19338    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19339    pub enabled_extensions: u8,
19340    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19341    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19342    pub s: i16,
19343    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19344    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19345    pub t: i16,
19346    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19347    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19348    pub aux1: i16,
19349    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19350    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19351    pub aux2: i16,
19352    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19353    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19354    pub aux3: i16,
19355    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19356    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19357    pub aux4: i16,
19358    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19359    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19360    pub aux5: i16,
19361    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19362    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19363    pub aux6: i16,
19364}
19365impl MANUAL_CONTROL_DATA {
19366    pub const ENCODED_LEN: usize = 30usize;
19367    pub const DEFAULT: Self = Self {
19368        x: 0_i16,
19369        y: 0_i16,
19370        z: 0_i16,
19371        r: 0_i16,
19372        buttons: 0_u16,
19373        target: 0_u8,
19374        buttons2: 0_u16,
19375        enabled_extensions: 0_u8,
19376        s: 0_i16,
19377        t: 0_i16,
19378        aux1: 0_i16,
19379        aux2: 0_i16,
19380        aux3: 0_i16,
19381        aux4: 0_i16,
19382        aux5: 0_i16,
19383        aux6: 0_i16,
19384    };
19385    #[cfg(feature = "arbitrary")]
19386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19387        use arbitrary::{Arbitrary, Unstructured};
19388        let mut buf = [0u8; 1024];
19389        rng.fill_bytes(&mut buf);
19390        let mut unstructured = Unstructured::new(&buf);
19391        Self::arbitrary(&mut unstructured).unwrap_or_default()
19392    }
19393}
19394impl Default for MANUAL_CONTROL_DATA {
19395    fn default() -> Self {
19396        Self::DEFAULT.clone()
19397    }
19398}
19399impl MessageData for MANUAL_CONTROL_DATA {
19400    type Message = MavMessage;
19401    const ID: u32 = 69u32;
19402    const NAME: &'static str = "MANUAL_CONTROL";
19403    const EXTRA_CRC: u8 = 243u8;
19404    const ENCODED_LEN: usize = 30usize;
19405    fn deser(
19406        _version: MavlinkVersion,
19407        __input: &[u8],
19408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19409        let avail_len = __input.len();
19410        let mut payload_buf = [0; Self::ENCODED_LEN];
19411        let mut buf = if avail_len < Self::ENCODED_LEN {
19412            payload_buf[0..avail_len].copy_from_slice(__input);
19413            Bytes::new(&payload_buf)
19414        } else {
19415            Bytes::new(__input)
19416        };
19417        let mut __struct = Self::default();
19418        __struct.x = buf.get_i16_le();
19419        __struct.y = buf.get_i16_le();
19420        __struct.z = buf.get_i16_le();
19421        __struct.r = buf.get_i16_le();
19422        __struct.buttons = buf.get_u16_le();
19423        __struct.target = buf.get_u8();
19424        __struct.buttons2 = buf.get_u16_le();
19425        __struct.enabled_extensions = buf.get_u8();
19426        __struct.s = buf.get_i16_le();
19427        __struct.t = buf.get_i16_le();
19428        __struct.aux1 = buf.get_i16_le();
19429        __struct.aux2 = buf.get_i16_le();
19430        __struct.aux3 = buf.get_i16_le();
19431        __struct.aux4 = buf.get_i16_le();
19432        __struct.aux5 = buf.get_i16_le();
19433        __struct.aux6 = buf.get_i16_le();
19434        Ok(__struct)
19435    }
19436    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19437        let mut __tmp = BytesMut::new(bytes);
19438        #[allow(clippy::absurd_extreme_comparisons)]
19439        #[allow(unused_comparisons)]
19440        if __tmp.remaining() < Self::ENCODED_LEN {
19441            panic!(
19442                "buffer is too small (need {} bytes, but got {})",
19443                Self::ENCODED_LEN,
19444                __tmp.remaining(),
19445            )
19446        }
19447        __tmp.put_i16_le(self.x);
19448        __tmp.put_i16_le(self.y);
19449        __tmp.put_i16_le(self.z);
19450        __tmp.put_i16_le(self.r);
19451        __tmp.put_u16_le(self.buttons);
19452        __tmp.put_u8(self.target);
19453        if matches!(version, MavlinkVersion::V2) {
19454            __tmp.put_u16_le(self.buttons2);
19455            __tmp.put_u8(self.enabled_extensions);
19456            __tmp.put_i16_le(self.s);
19457            __tmp.put_i16_le(self.t);
19458            __tmp.put_i16_le(self.aux1);
19459            __tmp.put_i16_le(self.aux2);
19460            __tmp.put_i16_le(self.aux3);
19461            __tmp.put_i16_le(self.aux4);
19462            __tmp.put_i16_le(self.aux5);
19463            __tmp.put_i16_le(self.aux6);
19464            let len = __tmp.len();
19465            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19466        } else {
19467            __tmp.len()
19468        }
19469    }
19470}
19471#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19472#[doc = ""]
19473#[doc = "ID: 81"]
19474#[derive(Debug, Clone, PartialEq)]
19475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19477#[cfg_attr(feature = "ts", derive(TS))]
19478#[cfg_attr(feature = "ts", ts(export))]
19479pub struct MANUAL_SETPOINT_DATA {
19480    #[doc = "Timestamp (time since system boot)."]
19481    pub time_boot_ms: u32,
19482    #[doc = "Desired roll rate"]
19483    pub roll: f32,
19484    #[doc = "Desired pitch rate"]
19485    pub pitch: f32,
19486    #[doc = "Desired yaw rate"]
19487    pub yaw: f32,
19488    #[doc = "Collective thrust, normalized to 0 .. 1"]
19489    pub thrust: f32,
19490    #[doc = "Flight mode switch position, 0.. 255"]
19491    pub mode_switch: u8,
19492    #[doc = "Override mode switch position, 0.. 255"]
19493    pub manual_override_switch: u8,
19494}
19495impl MANUAL_SETPOINT_DATA {
19496    pub const ENCODED_LEN: usize = 22usize;
19497    pub const DEFAULT: Self = Self {
19498        time_boot_ms: 0_u32,
19499        roll: 0.0_f32,
19500        pitch: 0.0_f32,
19501        yaw: 0.0_f32,
19502        thrust: 0.0_f32,
19503        mode_switch: 0_u8,
19504        manual_override_switch: 0_u8,
19505    };
19506    #[cfg(feature = "arbitrary")]
19507    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19508        use arbitrary::{Arbitrary, Unstructured};
19509        let mut buf = [0u8; 1024];
19510        rng.fill_bytes(&mut buf);
19511        let mut unstructured = Unstructured::new(&buf);
19512        Self::arbitrary(&mut unstructured).unwrap_or_default()
19513    }
19514}
19515impl Default for MANUAL_SETPOINT_DATA {
19516    fn default() -> Self {
19517        Self::DEFAULT.clone()
19518    }
19519}
19520impl MessageData for MANUAL_SETPOINT_DATA {
19521    type Message = MavMessage;
19522    const ID: u32 = 81u32;
19523    const NAME: &'static str = "MANUAL_SETPOINT";
19524    const EXTRA_CRC: u8 = 106u8;
19525    const ENCODED_LEN: usize = 22usize;
19526    fn deser(
19527        _version: MavlinkVersion,
19528        __input: &[u8],
19529    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19530        let avail_len = __input.len();
19531        let mut payload_buf = [0; Self::ENCODED_LEN];
19532        let mut buf = if avail_len < Self::ENCODED_LEN {
19533            payload_buf[0..avail_len].copy_from_slice(__input);
19534            Bytes::new(&payload_buf)
19535        } else {
19536            Bytes::new(__input)
19537        };
19538        let mut __struct = Self::default();
19539        __struct.time_boot_ms = buf.get_u32_le();
19540        __struct.roll = buf.get_f32_le();
19541        __struct.pitch = buf.get_f32_le();
19542        __struct.yaw = buf.get_f32_le();
19543        __struct.thrust = buf.get_f32_le();
19544        __struct.mode_switch = buf.get_u8();
19545        __struct.manual_override_switch = buf.get_u8();
19546        Ok(__struct)
19547    }
19548    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19549        let mut __tmp = BytesMut::new(bytes);
19550        #[allow(clippy::absurd_extreme_comparisons)]
19551        #[allow(unused_comparisons)]
19552        if __tmp.remaining() < Self::ENCODED_LEN {
19553            panic!(
19554                "buffer is too small (need {} bytes, but got {})",
19555                Self::ENCODED_LEN,
19556                __tmp.remaining(),
19557            )
19558        }
19559        __tmp.put_u32_le(self.time_boot_ms);
19560        __tmp.put_f32_le(self.roll);
19561        __tmp.put_f32_le(self.pitch);
19562        __tmp.put_f32_le(self.yaw);
19563        __tmp.put_f32_le(self.thrust);
19564        __tmp.put_u8(self.mode_switch);
19565        __tmp.put_u8(self.manual_override_switch);
19566        if matches!(version, MavlinkVersion::V2) {
19567            let len = __tmp.len();
19568            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19569        } else {
19570            __tmp.len()
19571        }
19572    }
19573}
19574#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19575#[doc = ""]
19576#[doc = "ID: 249"]
19577#[derive(Debug, Clone, PartialEq)]
19578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19580#[cfg_attr(feature = "ts", derive(TS))]
19581#[cfg_attr(feature = "ts", ts(export))]
19582pub struct MEMORY_VECT_DATA {
19583    #[doc = "Starting address of the debug variables"]
19584    pub address: u16,
19585    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19586    pub ver: u8,
19587    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19588    pub mavtype: u8,
19589    #[doc = "Memory contents at specified address"]
19590    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19591    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19592    pub value: [i8; 32],
19593}
19594impl MEMORY_VECT_DATA {
19595    pub const ENCODED_LEN: usize = 36usize;
19596    pub const DEFAULT: Self = Self {
19597        address: 0_u16,
19598        ver: 0_u8,
19599        mavtype: 0_u8,
19600        value: [0_i8; 32usize],
19601    };
19602    #[cfg(feature = "arbitrary")]
19603    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19604        use arbitrary::{Arbitrary, Unstructured};
19605        let mut buf = [0u8; 1024];
19606        rng.fill_bytes(&mut buf);
19607        let mut unstructured = Unstructured::new(&buf);
19608        Self::arbitrary(&mut unstructured).unwrap_or_default()
19609    }
19610}
19611impl Default for MEMORY_VECT_DATA {
19612    fn default() -> Self {
19613        Self::DEFAULT.clone()
19614    }
19615}
19616impl MessageData for MEMORY_VECT_DATA {
19617    type Message = MavMessage;
19618    const ID: u32 = 249u32;
19619    const NAME: &'static str = "MEMORY_VECT";
19620    const EXTRA_CRC: u8 = 204u8;
19621    const ENCODED_LEN: usize = 36usize;
19622    fn deser(
19623        _version: MavlinkVersion,
19624        __input: &[u8],
19625    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19626        let avail_len = __input.len();
19627        let mut payload_buf = [0; Self::ENCODED_LEN];
19628        let mut buf = if avail_len < Self::ENCODED_LEN {
19629            payload_buf[0..avail_len].copy_from_slice(__input);
19630            Bytes::new(&payload_buf)
19631        } else {
19632            Bytes::new(__input)
19633        };
19634        let mut __struct = Self::default();
19635        __struct.address = buf.get_u16_le();
19636        __struct.ver = buf.get_u8();
19637        __struct.mavtype = buf.get_u8();
19638        for v in &mut __struct.value {
19639            let val = buf.get_i8();
19640            *v = val;
19641        }
19642        Ok(__struct)
19643    }
19644    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19645        let mut __tmp = BytesMut::new(bytes);
19646        #[allow(clippy::absurd_extreme_comparisons)]
19647        #[allow(unused_comparisons)]
19648        if __tmp.remaining() < Self::ENCODED_LEN {
19649            panic!(
19650                "buffer is too small (need {} bytes, but got {})",
19651                Self::ENCODED_LEN,
19652                __tmp.remaining(),
19653            )
19654        }
19655        __tmp.put_u16_le(self.address);
19656        __tmp.put_u8(self.ver);
19657        __tmp.put_u8(self.mavtype);
19658        for val in &self.value {
19659            __tmp.put_i8(*val);
19660        }
19661        if matches!(version, MavlinkVersion::V2) {
19662            let len = __tmp.len();
19663            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19664        } else {
19665            __tmp.len()
19666        }
19667    }
19668}
19669#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19670#[doc = ""]
19671#[doc = "ID: 244"]
19672#[derive(Debug, Clone, PartialEq)]
19673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19675#[cfg_attr(feature = "ts", derive(TS))]
19676#[cfg_attr(feature = "ts", ts(export))]
19677pub struct MESSAGE_INTERVAL_DATA {
19678    #[doc = "0 indicates the interval at which it is sent."]
19679    pub interval_us: i32,
19680    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19681    pub message_id: u16,
19682}
19683impl MESSAGE_INTERVAL_DATA {
19684    pub const ENCODED_LEN: usize = 6usize;
19685    pub const DEFAULT: Self = Self {
19686        interval_us: 0_i32,
19687        message_id: 0_u16,
19688    };
19689    #[cfg(feature = "arbitrary")]
19690    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19691        use arbitrary::{Arbitrary, Unstructured};
19692        let mut buf = [0u8; 1024];
19693        rng.fill_bytes(&mut buf);
19694        let mut unstructured = Unstructured::new(&buf);
19695        Self::arbitrary(&mut unstructured).unwrap_or_default()
19696    }
19697}
19698impl Default for MESSAGE_INTERVAL_DATA {
19699    fn default() -> Self {
19700        Self::DEFAULT.clone()
19701    }
19702}
19703impl MessageData for MESSAGE_INTERVAL_DATA {
19704    type Message = MavMessage;
19705    const ID: u32 = 244u32;
19706    const NAME: &'static str = "MESSAGE_INTERVAL";
19707    const EXTRA_CRC: u8 = 95u8;
19708    const ENCODED_LEN: usize = 6usize;
19709    fn deser(
19710        _version: MavlinkVersion,
19711        __input: &[u8],
19712    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19713        let avail_len = __input.len();
19714        let mut payload_buf = [0; Self::ENCODED_LEN];
19715        let mut buf = if avail_len < Self::ENCODED_LEN {
19716            payload_buf[0..avail_len].copy_from_slice(__input);
19717            Bytes::new(&payload_buf)
19718        } else {
19719            Bytes::new(__input)
19720        };
19721        let mut __struct = Self::default();
19722        __struct.interval_us = buf.get_i32_le();
19723        __struct.message_id = buf.get_u16_le();
19724        Ok(__struct)
19725    }
19726    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19727        let mut __tmp = BytesMut::new(bytes);
19728        #[allow(clippy::absurd_extreme_comparisons)]
19729        #[allow(unused_comparisons)]
19730        if __tmp.remaining() < Self::ENCODED_LEN {
19731            panic!(
19732                "buffer is too small (need {} bytes, but got {})",
19733                Self::ENCODED_LEN,
19734                __tmp.remaining(),
19735            )
19736        }
19737        __tmp.put_i32_le(self.interval_us);
19738        __tmp.put_u16_le(self.message_id);
19739        if matches!(version, MavlinkVersion::V2) {
19740            let len = __tmp.len();
19741            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19742        } else {
19743            __tmp.len()
19744        }
19745    }
19746}
19747#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19748#[doc = ""]
19749#[doc = "ID: 47"]
19750#[derive(Debug, Clone, PartialEq)]
19751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19752#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19753#[cfg_attr(feature = "ts", derive(TS))]
19754#[cfg_attr(feature = "ts", ts(export))]
19755pub struct MISSION_ACK_DATA {
19756    #[doc = "System ID"]
19757    pub target_system: u8,
19758    #[doc = "Component ID"]
19759    pub target_component: u8,
19760    #[doc = "Mission result."]
19761    pub mavtype: MavMissionResult,
19762    #[doc = "Mission type."]
19763    #[cfg_attr(feature = "serde", serde(default))]
19764    pub mission_type: MavMissionType,
19765    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19766    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19767    pub opaque_id: u32,
19768}
19769impl MISSION_ACK_DATA {
19770    pub const ENCODED_LEN: usize = 8usize;
19771    pub const DEFAULT: Self = Self {
19772        target_system: 0_u8,
19773        target_component: 0_u8,
19774        mavtype: MavMissionResult::DEFAULT,
19775        mission_type: MavMissionType::DEFAULT,
19776        opaque_id: 0_u32,
19777    };
19778    #[cfg(feature = "arbitrary")]
19779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19780        use arbitrary::{Arbitrary, Unstructured};
19781        let mut buf = [0u8; 1024];
19782        rng.fill_bytes(&mut buf);
19783        let mut unstructured = Unstructured::new(&buf);
19784        Self::arbitrary(&mut unstructured).unwrap_or_default()
19785    }
19786}
19787impl Default for MISSION_ACK_DATA {
19788    fn default() -> Self {
19789        Self::DEFAULT.clone()
19790    }
19791}
19792impl MessageData for MISSION_ACK_DATA {
19793    type Message = MavMessage;
19794    const ID: u32 = 47u32;
19795    const NAME: &'static str = "MISSION_ACK";
19796    const EXTRA_CRC: u8 = 153u8;
19797    const ENCODED_LEN: usize = 8usize;
19798    fn deser(
19799        _version: MavlinkVersion,
19800        __input: &[u8],
19801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19802        let avail_len = __input.len();
19803        let mut payload_buf = [0; Self::ENCODED_LEN];
19804        let mut buf = if avail_len < Self::ENCODED_LEN {
19805            payload_buf[0..avail_len].copy_from_slice(__input);
19806            Bytes::new(&payload_buf)
19807        } else {
19808            Bytes::new(__input)
19809        };
19810        let mut __struct = Self::default();
19811        __struct.target_system = buf.get_u8();
19812        __struct.target_component = buf.get_u8();
19813        let tmp = buf.get_u8();
19814        __struct.mavtype =
19815            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19816                enum_type: "MavMissionResult",
19817                value: tmp as u32,
19818            })?;
19819        let tmp = buf.get_u8();
19820        __struct.mission_type =
19821            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19822                enum_type: "MavMissionType",
19823                value: tmp as u32,
19824            })?;
19825        __struct.opaque_id = buf.get_u32_le();
19826        Ok(__struct)
19827    }
19828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19829        let mut __tmp = BytesMut::new(bytes);
19830        #[allow(clippy::absurd_extreme_comparisons)]
19831        #[allow(unused_comparisons)]
19832        if __tmp.remaining() < Self::ENCODED_LEN {
19833            panic!(
19834                "buffer is too small (need {} bytes, but got {})",
19835                Self::ENCODED_LEN,
19836                __tmp.remaining(),
19837            )
19838        }
19839        __tmp.put_u8(self.target_system);
19840        __tmp.put_u8(self.target_component);
19841        __tmp.put_u8(self.mavtype as u8);
19842        if matches!(version, MavlinkVersion::V2) {
19843            __tmp.put_u8(self.mission_type as u8);
19844            __tmp.put_u32_le(self.opaque_id);
19845            let len = __tmp.len();
19846            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19847        } else {
19848            __tmp.len()
19849        }
19850    }
19851}
19852#[doc = "Delete all mission items at once."]
19853#[doc = ""]
19854#[doc = "ID: 45"]
19855#[derive(Debug, Clone, PartialEq)]
19856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19858#[cfg_attr(feature = "ts", derive(TS))]
19859#[cfg_attr(feature = "ts", ts(export))]
19860pub struct MISSION_CLEAR_ALL_DATA {
19861    #[doc = "System ID"]
19862    pub target_system: u8,
19863    #[doc = "Component ID"]
19864    pub target_component: u8,
19865    #[doc = "Mission type."]
19866    #[cfg_attr(feature = "serde", serde(default))]
19867    pub mission_type: MavMissionType,
19868}
19869impl MISSION_CLEAR_ALL_DATA {
19870    pub const ENCODED_LEN: usize = 3usize;
19871    pub const DEFAULT: Self = Self {
19872        target_system: 0_u8,
19873        target_component: 0_u8,
19874        mission_type: MavMissionType::DEFAULT,
19875    };
19876    #[cfg(feature = "arbitrary")]
19877    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19878        use arbitrary::{Arbitrary, Unstructured};
19879        let mut buf = [0u8; 1024];
19880        rng.fill_bytes(&mut buf);
19881        let mut unstructured = Unstructured::new(&buf);
19882        Self::arbitrary(&mut unstructured).unwrap_or_default()
19883    }
19884}
19885impl Default for MISSION_CLEAR_ALL_DATA {
19886    fn default() -> Self {
19887        Self::DEFAULT.clone()
19888    }
19889}
19890impl MessageData for MISSION_CLEAR_ALL_DATA {
19891    type Message = MavMessage;
19892    const ID: u32 = 45u32;
19893    const NAME: &'static str = "MISSION_CLEAR_ALL";
19894    const EXTRA_CRC: u8 = 232u8;
19895    const ENCODED_LEN: usize = 3usize;
19896    fn deser(
19897        _version: MavlinkVersion,
19898        __input: &[u8],
19899    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19900        let avail_len = __input.len();
19901        let mut payload_buf = [0; Self::ENCODED_LEN];
19902        let mut buf = if avail_len < Self::ENCODED_LEN {
19903            payload_buf[0..avail_len].copy_from_slice(__input);
19904            Bytes::new(&payload_buf)
19905        } else {
19906            Bytes::new(__input)
19907        };
19908        let mut __struct = Self::default();
19909        __struct.target_system = buf.get_u8();
19910        __struct.target_component = buf.get_u8();
19911        let tmp = buf.get_u8();
19912        __struct.mission_type =
19913            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19914                enum_type: "MavMissionType",
19915                value: tmp as u32,
19916            })?;
19917        Ok(__struct)
19918    }
19919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19920        let mut __tmp = BytesMut::new(bytes);
19921        #[allow(clippy::absurd_extreme_comparisons)]
19922        #[allow(unused_comparisons)]
19923        if __tmp.remaining() < Self::ENCODED_LEN {
19924            panic!(
19925                "buffer is too small (need {} bytes, but got {})",
19926                Self::ENCODED_LEN,
19927                __tmp.remaining(),
19928            )
19929        }
19930        __tmp.put_u8(self.target_system);
19931        __tmp.put_u8(self.target_component);
19932        if matches!(version, MavlinkVersion::V2) {
19933            __tmp.put_u8(self.mission_type as u8);
19934            let len = __tmp.len();
19935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19936        } else {
19937            __tmp.len()
19938        }
19939    }
19940}
19941#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19942#[doc = ""]
19943#[doc = "ID: 44"]
19944#[derive(Debug, Clone, PartialEq)]
19945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19947#[cfg_attr(feature = "ts", derive(TS))]
19948#[cfg_attr(feature = "ts", ts(export))]
19949pub struct MISSION_COUNT_DATA {
19950    #[doc = "Number of mission items in the sequence"]
19951    pub count: u16,
19952    #[doc = "System ID"]
19953    pub target_system: u8,
19954    #[doc = "Component ID"]
19955    pub target_component: u8,
19956    #[doc = "Mission type."]
19957    #[cfg_attr(feature = "serde", serde(default))]
19958    pub mission_type: MavMissionType,
19959    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19960    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19961    pub opaque_id: u32,
19962}
19963impl MISSION_COUNT_DATA {
19964    pub const ENCODED_LEN: usize = 9usize;
19965    pub const DEFAULT: Self = Self {
19966        count: 0_u16,
19967        target_system: 0_u8,
19968        target_component: 0_u8,
19969        mission_type: MavMissionType::DEFAULT,
19970        opaque_id: 0_u32,
19971    };
19972    #[cfg(feature = "arbitrary")]
19973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19974        use arbitrary::{Arbitrary, Unstructured};
19975        let mut buf = [0u8; 1024];
19976        rng.fill_bytes(&mut buf);
19977        let mut unstructured = Unstructured::new(&buf);
19978        Self::arbitrary(&mut unstructured).unwrap_or_default()
19979    }
19980}
19981impl Default for MISSION_COUNT_DATA {
19982    fn default() -> Self {
19983        Self::DEFAULT.clone()
19984    }
19985}
19986impl MessageData for MISSION_COUNT_DATA {
19987    type Message = MavMessage;
19988    const ID: u32 = 44u32;
19989    const NAME: &'static str = "MISSION_COUNT";
19990    const EXTRA_CRC: u8 = 221u8;
19991    const ENCODED_LEN: usize = 9usize;
19992    fn deser(
19993        _version: MavlinkVersion,
19994        __input: &[u8],
19995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19996        let avail_len = __input.len();
19997        let mut payload_buf = [0; Self::ENCODED_LEN];
19998        let mut buf = if avail_len < Self::ENCODED_LEN {
19999            payload_buf[0..avail_len].copy_from_slice(__input);
20000            Bytes::new(&payload_buf)
20001        } else {
20002            Bytes::new(__input)
20003        };
20004        let mut __struct = Self::default();
20005        __struct.count = buf.get_u16_le();
20006        __struct.target_system = buf.get_u8();
20007        __struct.target_component = buf.get_u8();
20008        let tmp = buf.get_u8();
20009        __struct.mission_type =
20010            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20011                enum_type: "MavMissionType",
20012                value: tmp as u32,
20013            })?;
20014        __struct.opaque_id = buf.get_u32_le();
20015        Ok(__struct)
20016    }
20017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20018        let mut __tmp = BytesMut::new(bytes);
20019        #[allow(clippy::absurd_extreme_comparisons)]
20020        #[allow(unused_comparisons)]
20021        if __tmp.remaining() < Self::ENCODED_LEN {
20022            panic!(
20023                "buffer is too small (need {} bytes, but got {})",
20024                Self::ENCODED_LEN,
20025                __tmp.remaining(),
20026            )
20027        }
20028        __tmp.put_u16_le(self.count);
20029        __tmp.put_u8(self.target_system);
20030        __tmp.put_u8(self.target_component);
20031        if matches!(version, MavlinkVersion::V2) {
20032            __tmp.put_u8(self.mission_type as u8);
20033            __tmp.put_u32_le(self.opaque_id);
20034            let len = __tmp.len();
20035            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20036        } else {
20037            __tmp.len()
20038        }
20039    }
20040}
20041#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
20042#[doc = ""]
20043#[doc = "ID: 42"]
20044#[derive(Debug, Clone, PartialEq)]
20045#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20046#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20047#[cfg_attr(feature = "ts", derive(TS))]
20048#[cfg_attr(feature = "ts", ts(export))]
20049pub struct MISSION_CURRENT_DATA {
20050    #[doc = "Sequence"]
20051    pub seq: u16,
20052    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
20053    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20054    pub total: u16,
20055    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
20056    #[cfg_attr(feature = "serde", serde(default))]
20057    pub mission_state: MissionState,
20058    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
20059    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20060    pub mission_mode: u8,
20061    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
20062    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20063    pub mission_id: u32,
20064    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
20065    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20066    pub fence_id: u32,
20067    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
20068    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20069    pub rally_points_id: u32,
20070}
20071impl MISSION_CURRENT_DATA {
20072    pub const ENCODED_LEN: usize = 18usize;
20073    pub const DEFAULT: Self = Self {
20074        seq: 0_u16,
20075        total: 0_u16,
20076        mission_state: MissionState::DEFAULT,
20077        mission_mode: 0_u8,
20078        mission_id: 0_u32,
20079        fence_id: 0_u32,
20080        rally_points_id: 0_u32,
20081    };
20082    #[cfg(feature = "arbitrary")]
20083    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20084        use arbitrary::{Arbitrary, Unstructured};
20085        let mut buf = [0u8; 1024];
20086        rng.fill_bytes(&mut buf);
20087        let mut unstructured = Unstructured::new(&buf);
20088        Self::arbitrary(&mut unstructured).unwrap_or_default()
20089    }
20090}
20091impl Default for MISSION_CURRENT_DATA {
20092    fn default() -> Self {
20093        Self::DEFAULT.clone()
20094    }
20095}
20096impl MessageData for MISSION_CURRENT_DATA {
20097    type Message = MavMessage;
20098    const ID: u32 = 42u32;
20099    const NAME: &'static str = "MISSION_CURRENT";
20100    const EXTRA_CRC: u8 = 28u8;
20101    const ENCODED_LEN: usize = 18usize;
20102    fn deser(
20103        _version: MavlinkVersion,
20104        __input: &[u8],
20105    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20106        let avail_len = __input.len();
20107        let mut payload_buf = [0; Self::ENCODED_LEN];
20108        let mut buf = if avail_len < Self::ENCODED_LEN {
20109            payload_buf[0..avail_len].copy_from_slice(__input);
20110            Bytes::new(&payload_buf)
20111        } else {
20112            Bytes::new(__input)
20113        };
20114        let mut __struct = Self::default();
20115        __struct.seq = buf.get_u16_le();
20116        __struct.total = buf.get_u16_le();
20117        let tmp = buf.get_u8();
20118        __struct.mission_state =
20119            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20120                enum_type: "MissionState",
20121                value: tmp as u32,
20122            })?;
20123        __struct.mission_mode = buf.get_u8();
20124        __struct.mission_id = buf.get_u32_le();
20125        __struct.fence_id = buf.get_u32_le();
20126        __struct.rally_points_id = buf.get_u32_le();
20127        Ok(__struct)
20128    }
20129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20130        let mut __tmp = BytesMut::new(bytes);
20131        #[allow(clippy::absurd_extreme_comparisons)]
20132        #[allow(unused_comparisons)]
20133        if __tmp.remaining() < Self::ENCODED_LEN {
20134            panic!(
20135                "buffer is too small (need {} bytes, but got {})",
20136                Self::ENCODED_LEN,
20137                __tmp.remaining(),
20138            )
20139        }
20140        __tmp.put_u16_le(self.seq);
20141        if matches!(version, MavlinkVersion::V2) {
20142            __tmp.put_u16_le(self.total);
20143            __tmp.put_u8(self.mission_state as u8);
20144            __tmp.put_u8(self.mission_mode);
20145            __tmp.put_u32_le(self.mission_id);
20146            __tmp.put_u32_le(self.fence_id);
20147            __tmp.put_u32_le(self.rally_points_id);
20148            let len = __tmp.len();
20149            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20150        } else {
20151            __tmp.len()
20152        }
20153    }
20154}
20155#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
20156#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20157#[doc = ""]
20158#[doc = "ID: 39"]
20159#[derive(Debug, Clone, PartialEq)]
20160#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20161#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20162#[cfg_attr(feature = "ts", derive(TS))]
20163#[cfg_attr(feature = "ts", ts(export))]
20164pub struct MISSION_ITEM_DATA {
20165    #[doc = "PARAM1, see MAV_CMD enum"]
20166    pub param1: f32,
20167    #[doc = "PARAM2, see MAV_CMD enum"]
20168    pub param2: f32,
20169    #[doc = "PARAM3, see MAV_CMD enum"]
20170    pub param3: f32,
20171    #[doc = "PARAM4, see MAV_CMD enum"]
20172    pub param4: f32,
20173    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20174    pub x: f32,
20175    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20176    pub y: f32,
20177    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20178    pub z: f32,
20179    #[doc = "Sequence"]
20180    pub seq: u16,
20181    #[doc = "The scheduled action for the waypoint."]
20182    pub command: MavCmd,
20183    #[doc = "System ID"]
20184    pub target_system: u8,
20185    #[doc = "Component ID"]
20186    pub target_component: u8,
20187    #[doc = "The coordinate system of the waypoint."]
20188    pub frame: MavFrame,
20189    #[doc = "false:0, true:1"]
20190    pub current: u8,
20191    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20192    pub autocontinue: u8,
20193    #[doc = "Mission type."]
20194    #[cfg_attr(feature = "serde", serde(default))]
20195    pub mission_type: MavMissionType,
20196}
20197impl MISSION_ITEM_DATA {
20198    pub const ENCODED_LEN: usize = 38usize;
20199    pub const DEFAULT: Self = Self {
20200        param1: 0.0_f32,
20201        param2: 0.0_f32,
20202        param3: 0.0_f32,
20203        param4: 0.0_f32,
20204        x: 0.0_f32,
20205        y: 0.0_f32,
20206        z: 0.0_f32,
20207        seq: 0_u16,
20208        command: MavCmd::DEFAULT,
20209        target_system: 0_u8,
20210        target_component: 0_u8,
20211        frame: MavFrame::DEFAULT,
20212        current: 0_u8,
20213        autocontinue: 0_u8,
20214        mission_type: MavMissionType::DEFAULT,
20215    };
20216    #[cfg(feature = "arbitrary")]
20217    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20218        use arbitrary::{Arbitrary, Unstructured};
20219        let mut buf = [0u8; 1024];
20220        rng.fill_bytes(&mut buf);
20221        let mut unstructured = Unstructured::new(&buf);
20222        Self::arbitrary(&mut unstructured).unwrap_or_default()
20223    }
20224}
20225impl Default for MISSION_ITEM_DATA {
20226    fn default() -> Self {
20227        Self::DEFAULT.clone()
20228    }
20229}
20230impl MessageData for MISSION_ITEM_DATA {
20231    type Message = MavMessage;
20232    const ID: u32 = 39u32;
20233    const NAME: &'static str = "MISSION_ITEM";
20234    const EXTRA_CRC: u8 = 254u8;
20235    const ENCODED_LEN: usize = 38usize;
20236    fn deser(
20237        _version: MavlinkVersion,
20238        __input: &[u8],
20239    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20240        let avail_len = __input.len();
20241        let mut payload_buf = [0; Self::ENCODED_LEN];
20242        let mut buf = if avail_len < Self::ENCODED_LEN {
20243            payload_buf[0..avail_len].copy_from_slice(__input);
20244            Bytes::new(&payload_buf)
20245        } else {
20246            Bytes::new(__input)
20247        };
20248        let mut __struct = Self::default();
20249        __struct.param1 = buf.get_f32_le();
20250        __struct.param2 = buf.get_f32_le();
20251        __struct.param3 = buf.get_f32_le();
20252        __struct.param4 = buf.get_f32_le();
20253        __struct.x = buf.get_f32_le();
20254        __struct.y = buf.get_f32_le();
20255        __struct.z = buf.get_f32_le();
20256        __struct.seq = buf.get_u16_le();
20257        let tmp = buf.get_u16_le();
20258        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20259            ::mavlink_core::error::ParserError::InvalidEnum {
20260                enum_type: "MavCmd",
20261                value: tmp as u32,
20262            },
20263        )?;
20264        __struct.target_system = buf.get_u8();
20265        __struct.target_component = buf.get_u8();
20266        let tmp = buf.get_u8();
20267        __struct.frame =
20268            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20269                enum_type: "MavFrame",
20270                value: tmp as u32,
20271            })?;
20272        __struct.current = buf.get_u8();
20273        __struct.autocontinue = buf.get_u8();
20274        let tmp = buf.get_u8();
20275        __struct.mission_type =
20276            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20277                enum_type: "MavMissionType",
20278                value: tmp as u32,
20279            })?;
20280        Ok(__struct)
20281    }
20282    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20283        let mut __tmp = BytesMut::new(bytes);
20284        #[allow(clippy::absurd_extreme_comparisons)]
20285        #[allow(unused_comparisons)]
20286        if __tmp.remaining() < Self::ENCODED_LEN {
20287            panic!(
20288                "buffer is too small (need {} bytes, but got {})",
20289                Self::ENCODED_LEN,
20290                __tmp.remaining(),
20291            )
20292        }
20293        __tmp.put_f32_le(self.param1);
20294        __tmp.put_f32_le(self.param2);
20295        __tmp.put_f32_le(self.param3);
20296        __tmp.put_f32_le(self.param4);
20297        __tmp.put_f32_le(self.x);
20298        __tmp.put_f32_le(self.y);
20299        __tmp.put_f32_le(self.z);
20300        __tmp.put_u16_le(self.seq);
20301        __tmp.put_u16_le(self.command as u16);
20302        __tmp.put_u8(self.target_system);
20303        __tmp.put_u8(self.target_component);
20304        __tmp.put_u8(self.frame as u8);
20305        __tmp.put_u8(self.current);
20306        __tmp.put_u8(self.autocontinue);
20307        if matches!(version, MavlinkVersion::V2) {
20308            __tmp.put_u8(self.mission_type as u8);
20309            let len = __tmp.len();
20310            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20311        } else {
20312            __tmp.len()
20313        }
20314    }
20315}
20316#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20317#[doc = ""]
20318#[doc = "ID: 73"]
20319#[derive(Debug, Clone, PartialEq)]
20320#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20321#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20322#[cfg_attr(feature = "ts", derive(TS))]
20323#[cfg_attr(feature = "ts", ts(export))]
20324pub struct MISSION_ITEM_INT_DATA {
20325    #[doc = "PARAM1, see MAV_CMD enum"]
20326    pub param1: f32,
20327    #[doc = "PARAM2, see MAV_CMD enum"]
20328    pub param2: f32,
20329    #[doc = "PARAM3, see MAV_CMD enum"]
20330    pub param3: f32,
20331    #[doc = "PARAM4, see MAV_CMD enum"]
20332    pub param4: f32,
20333    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20334    pub x: i32,
20335    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20336    pub y: i32,
20337    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20338    pub z: f32,
20339    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20340    pub seq: u16,
20341    #[doc = "The scheduled action for the waypoint."]
20342    pub command: MavCmd,
20343    #[doc = "System ID"]
20344    pub target_system: u8,
20345    #[doc = "Component ID"]
20346    pub target_component: u8,
20347    #[doc = "The coordinate system of the waypoint."]
20348    pub frame: MavFrame,
20349    #[doc = "false:0, true:1"]
20350    pub current: u8,
20351    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20352    pub autocontinue: u8,
20353    #[doc = "Mission type."]
20354    #[cfg_attr(feature = "serde", serde(default))]
20355    pub mission_type: MavMissionType,
20356}
20357impl MISSION_ITEM_INT_DATA {
20358    pub const ENCODED_LEN: usize = 38usize;
20359    pub const DEFAULT: Self = Self {
20360        param1: 0.0_f32,
20361        param2: 0.0_f32,
20362        param3: 0.0_f32,
20363        param4: 0.0_f32,
20364        x: 0_i32,
20365        y: 0_i32,
20366        z: 0.0_f32,
20367        seq: 0_u16,
20368        command: MavCmd::DEFAULT,
20369        target_system: 0_u8,
20370        target_component: 0_u8,
20371        frame: MavFrame::DEFAULT,
20372        current: 0_u8,
20373        autocontinue: 0_u8,
20374        mission_type: MavMissionType::DEFAULT,
20375    };
20376    #[cfg(feature = "arbitrary")]
20377    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20378        use arbitrary::{Arbitrary, Unstructured};
20379        let mut buf = [0u8; 1024];
20380        rng.fill_bytes(&mut buf);
20381        let mut unstructured = Unstructured::new(&buf);
20382        Self::arbitrary(&mut unstructured).unwrap_or_default()
20383    }
20384}
20385impl Default for MISSION_ITEM_INT_DATA {
20386    fn default() -> Self {
20387        Self::DEFAULT.clone()
20388    }
20389}
20390impl MessageData for MISSION_ITEM_INT_DATA {
20391    type Message = MavMessage;
20392    const ID: u32 = 73u32;
20393    const NAME: &'static str = "MISSION_ITEM_INT";
20394    const EXTRA_CRC: u8 = 38u8;
20395    const ENCODED_LEN: usize = 38usize;
20396    fn deser(
20397        _version: MavlinkVersion,
20398        __input: &[u8],
20399    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20400        let avail_len = __input.len();
20401        let mut payload_buf = [0; Self::ENCODED_LEN];
20402        let mut buf = if avail_len < Self::ENCODED_LEN {
20403            payload_buf[0..avail_len].copy_from_slice(__input);
20404            Bytes::new(&payload_buf)
20405        } else {
20406            Bytes::new(__input)
20407        };
20408        let mut __struct = Self::default();
20409        __struct.param1 = buf.get_f32_le();
20410        __struct.param2 = buf.get_f32_le();
20411        __struct.param3 = buf.get_f32_le();
20412        __struct.param4 = buf.get_f32_le();
20413        __struct.x = buf.get_i32_le();
20414        __struct.y = buf.get_i32_le();
20415        __struct.z = buf.get_f32_le();
20416        __struct.seq = buf.get_u16_le();
20417        let tmp = buf.get_u16_le();
20418        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20419            ::mavlink_core::error::ParserError::InvalidEnum {
20420                enum_type: "MavCmd",
20421                value: tmp as u32,
20422            },
20423        )?;
20424        __struct.target_system = buf.get_u8();
20425        __struct.target_component = buf.get_u8();
20426        let tmp = buf.get_u8();
20427        __struct.frame =
20428            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20429                enum_type: "MavFrame",
20430                value: tmp as u32,
20431            })?;
20432        __struct.current = buf.get_u8();
20433        __struct.autocontinue = buf.get_u8();
20434        let tmp = buf.get_u8();
20435        __struct.mission_type =
20436            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20437                enum_type: "MavMissionType",
20438                value: tmp as u32,
20439            })?;
20440        Ok(__struct)
20441    }
20442    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20443        let mut __tmp = BytesMut::new(bytes);
20444        #[allow(clippy::absurd_extreme_comparisons)]
20445        #[allow(unused_comparisons)]
20446        if __tmp.remaining() < Self::ENCODED_LEN {
20447            panic!(
20448                "buffer is too small (need {} bytes, but got {})",
20449                Self::ENCODED_LEN,
20450                __tmp.remaining(),
20451            )
20452        }
20453        __tmp.put_f32_le(self.param1);
20454        __tmp.put_f32_le(self.param2);
20455        __tmp.put_f32_le(self.param3);
20456        __tmp.put_f32_le(self.param4);
20457        __tmp.put_i32_le(self.x);
20458        __tmp.put_i32_le(self.y);
20459        __tmp.put_f32_le(self.z);
20460        __tmp.put_u16_le(self.seq);
20461        __tmp.put_u16_le(self.command as u16);
20462        __tmp.put_u8(self.target_system);
20463        __tmp.put_u8(self.target_component);
20464        __tmp.put_u8(self.frame as u8);
20465        __tmp.put_u8(self.current);
20466        __tmp.put_u8(self.autocontinue);
20467        if matches!(version, MavlinkVersion::V2) {
20468            __tmp.put_u8(self.mission_type as u8);
20469            let len = __tmp.len();
20470            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20471        } else {
20472            __tmp.len()
20473        }
20474    }
20475}
20476#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20477#[doc = ""]
20478#[doc = "ID: 46"]
20479#[derive(Debug, Clone, PartialEq)]
20480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20482#[cfg_attr(feature = "ts", derive(TS))]
20483#[cfg_attr(feature = "ts", ts(export))]
20484pub struct MISSION_ITEM_REACHED_DATA {
20485    #[doc = "Sequence"]
20486    pub seq: u16,
20487}
20488impl MISSION_ITEM_REACHED_DATA {
20489    pub const ENCODED_LEN: usize = 2usize;
20490    pub const DEFAULT: Self = Self { seq: 0_u16 };
20491    #[cfg(feature = "arbitrary")]
20492    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20493        use arbitrary::{Arbitrary, Unstructured};
20494        let mut buf = [0u8; 1024];
20495        rng.fill_bytes(&mut buf);
20496        let mut unstructured = Unstructured::new(&buf);
20497        Self::arbitrary(&mut unstructured).unwrap_or_default()
20498    }
20499}
20500impl Default for MISSION_ITEM_REACHED_DATA {
20501    fn default() -> Self {
20502        Self::DEFAULT.clone()
20503    }
20504}
20505impl MessageData for MISSION_ITEM_REACHED_DATA {
20506    type Message = MavMessage;
20507    const ID: u32 = 46u32;
20508    const NAME: &'static str = "MISSION_ITEM_REACHED";
20509    const EXTRA_CRC: u8 = 11u8;
20510    const ENCODED_LEN: usize = 2usize;
20511    fn deser(
20512        _version: MavlinkVersion,
20513        __input: &[u8],
20514    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20515        let avail_len = __input.len();
20516        let mut payload_buf = [0; Self::ENCODED_LEN];
20517        let mut buf = if avail_len < Self::ENCODED_LEN {
20518            payload_buf[0..avail_len].copy_from_slice(__input);
20519            Bytes::new(&payload_buf)
20520        } else {
20521            Bytes::new(__input)
20522        };
20523        let mut __struct = Self::default();
20524        __struct.seq = buf.get_u16_le();
20525        Ok(__struct)
20526    }
20527    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20528        let mut __tmp = BytesMut::new(bytes);
20529        #[allow(clippy::absurd_extreme_comparisons)]
20530        #[allow(unused_comparisons)]
20531        if __tmp.remaining() < Self::ENCODED_LEN {
20532            panic!(
20533                "buffer is too small (need {} bytes, but got {})",
20534                Self::ENCODED_LEN,
20535                __tmp.remaining(),
20536            )
20537        }
20538        __tmp.put_u16_le(self.seq);
20539        if matches!(version, MavlinkVersion::V2) {
20540            let len = __tmp.len();
20541            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20542        } else {
20543            __tmp.len()
20544        }
20545    }
20546}
20547#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20548#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20549#[doc = ""]
20550#[doc = "ID: 40"]
20551#[derive(Debug, Clone, PartialEq)]
20552#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20553#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20554#[cfg_attr(feature = "ts", derive(TS))]
20555#[cfg_attr(feature = "ts", ts(export))]
20556pub struct MISSION_REQUEST_DATA {
20557    #[doc = "Sequence"]
20558    pub seq: u16,
20559    #[doc = "System ID"]
20560    pub target_system: u8,
20561    #[doc = "Component ID"]
20562    pub target_component: u8,
20563    #[doc = "Mission type."]
20564    #[cfg_attr(feature = "serde", serde(default))]
20565    pub mission_type: MavMissionType,
20566}
20567impl MISSION_REQUEST_DATA {
20568    pub const ENCODED_LEN: usize = 5usize;
20569    pub const DEFAULT: Self = Self {
20570        seq: 0_u16,
20571        target_system: 0_u8,
20572        target_component: 0_u8,
20573        mission_type: MavMissionType::DEFAULT,
20574    };
20575    #[cfg(feature = "arbitrary")]
20576    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20577        use arbitrary::{Arbitrary, Unstructured};
20578        let mut buf = [0u8; 1024];
20579        rng.fill_bytes(&mut buf);
20580        let mut unstructured = Unstructured::new(&buf);
20581        Self::arbitrary(&mut unstructured).unwrap_or_default()
20582    }
20583}
20584impl Default for MISSION_REQUEST_DATA {
20585    fn default() -> Self {
20586        Self::DEFAULT.clone()
20587    }
20588}
20589impl MessageData for MISSION_REQUEST_DATA {
20590    type Message = MavMessage;
20591    const ID: u32 = 40u32;
20592    const NAME: &'static str = "MISSION_REQUEST";
20593    const EXTRA_CRC: u8 = 230u8;
20594    const ENCODED_LEN: usize = 5usize;
20595    fn deser(
20596        _version: MavlinkVersion,
20597        __input: &[u8],
20598    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20599        let avail_len = __input.len();
20600        let mut payload_buf = [0; Self::ENCODED_LEN];
20601        let mut buf = if avail_len < Self::ENCODED_LEN {
20602            payload_buf[0..avail_len].copy_from_slice(__input);
20603            Bytes::new(&payload_buf)
20604        } else {
20605            Bytes::new(__input)
20606        };
20607        let mut __struct = Self::default();
20608        __struct.seq = buf.get_u16_le();
20609        __struct.target_system = buf.get_u8();
20610        __struct.target_component = buf.get_u8();
20611        let tmp = buf.get_u8();
20612        __struct.mission_type =
20613            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20614                enum_type: "MavMissionType",
20615                value: tmp as u32,
20616            })?;
20617        Ok(__struct)
20618    }
20619    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20620        let mut __tmp = BytesMut::new(bytes);
20621        #[allow(clippy::absurd_extreme_comparisons)]
20622        #[allow(unused_comparisons)]
20623        if __tmp.remaining() < Self::ENCODED_LEN {
20624            panic!(
20625                "buffer is too small (need {} bytes, but got {})",
20626                Self::ENCODED_LEN,
20627                __tmp.remaining(),
20628            )
20629        }
20630        __tmp.put_u16_le(self.seq);
20631        __tmp.put_u8(self.target_system);
20632        __tmp.put_u8(self.target_component);
20633        if matches!(version, MavlinkVersion::V2) {
20634            __tmp.put_u8(self.mission_type as u8);
20635            let len = __tmp.len();
20636            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20637        } else {
20638            __tmp.len()
20639        }
20640    }
20641}
20642#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20643#[doc = ""]
20644#[doc = "ID: 51"]
20645#[derive(Debug, Clone, PartialEq)]
20646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20647#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20648#[cfg_attr(feature = "ts", derive(TS))]
20649#[cfg_attr(feature = "ts", ts(export))]
20650pub struct MISSION_REQUEST_INT_DATA {
20651    #[doc = "Sequence"]
20652    pub seq: u16,
20653    #[doc = "System ID"]
20654    pub target_system: u8,
20655    #[doc = "Component ID"]
20656    pub target_component: u8,
20657    #[doc = "Mission type."]
20658    #[cfg_attr(feature = "serde", serde(default))]
20659    pub mission_type: MavMissionType,
20660}
20661impl MISSION_REQUEST_INT_DATA {
20662    pub const ENCODED_LEN: usize = 5usize;
20663    pub const DEFAULT: Self = Self {
20664        seq: 0_u16,
20665        target_system: 0_u8,
20666        target_component: 0_u8,
20667        mission_type: MavMissionType::DEFAULT,
20668    };
20669    #[cfg(feature = "arbitrary")]
20670    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20671        use arbitrary::{Arbitrary, Unstructured};
20672        let mut buf = [0u8; 1024];
20673        rng.fill_bytes(&mut buf);
20674        let mut unstructured = Unstructured::new(&buf);
20675        Self::arbitrary(&mut unstructured).unwrap_or_default()
20676    }
20677}
20678impl Default for MISSION_REQUEST_INT_DATA {
20679    fn default() -> Self {
20680        Self::DEFAULT.clone()
20681    }
20682}
20683impl MessageData for MISSION_REQUEST_INT_DATA {
20684    type Message = MavMessage;
20685    const ID: u32 = 51u32;
20686    const NAME: &'static str = "MISSION_REQUEST_INT";
20687    const EXTRA_CRC: u8 = 196u8;
20688    const ENCODED_LEN: usize = 5usize;
20689    fn deser(
20690        _version: MavlinkVersion,
20691        __input: &[u8],
20692    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20693        let avail_len = __input.len();
20694        let mut payload_buf = [0; Self::ENCODED_LEN];
20695        let mut buf = if avail_len < Self::ENCODED_LEN {
20696            payload_buf[0..avail_len].copy_from_slice(__input);
20697            Bytes::new(&payload_buf)
20698        } else {
20699            Bytes::new(__input)
20700        };
20701        let mut __struct = Self::default();
20702        __struct.seq = buf.get_u16_le();
20703        __struct.target_system = buf.get_u8();
20704        __struct.target_component = buf.get_u8();
20705        let tmp = buf.get_u8();
20706        __struct.mission_type =
20707            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20708                enum_type: "MavMissionType",
20709                value: tmp as u32,
20710            })?;
20711        Ok(__struct)
20712    }
20713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20714        let mut __tmp = BytesMut::new(bytes);
20715        #[allow(clippy::absurd_extreme_comparisons)]
20716        #[allow(unused_comparisons)]
20717        if __tmp.remaining() < Self::ENCODED_LEN {
20718            panic!(
20719                "buffer is too small (need {} bytes, but got {})",
20720                Self::ENCODED_LEN,
20721                __tmp.remaining(),
20722            )
20723        }
20724        __tmp.put_u16_le(self.seq);
20725        __tmp.put_u8(self.target_system);
20726        __tmp.put_u8(self.target_component);
20727        if matches!(version, MavlinkVersion::V2) {
20728            __tmp.put_u8(self.mission_type as u8);
20729            let len = __tmp.len();
20730            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20731        } else {
20732            __tmp.len()
20733        }
20734    }
20735}
20736#[doc = "Request the overall list of mission items from the system/component."]
20737#[doc = ""]
20738#[doc = "ID: 43"]
20739#[derive(Debug, Clone, PartialEq)]
20740#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20741#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20742#[cfg_attr(feature = "ts", derive(TS))]
20743#[cfg_attr(feature = "ts", ts(export))]
20744pub struct MISSION_REQUEST_LIST_DATA {
20745    #[doc = "System ID"]
20746    pub target_system: u8,
20747    #[doc = "Component ID"]
20748    pub target_component: u8,
20749    #[doc = "Mission type."]
20750    #[cfg_attr(feature = "serde", serde(default))]
20751    pub mission_type: MavMissionType,
20752}
20753impl MISSION_REQUEST_LIST_DATA {
20754    pub const ENCODED_LEN: usize = 3usize;
20755    pub const DEFAULT: Self = Self {
20756        target_system: 0_u8,
20757        target_component: 0_u8,
20758        mission_type: MavMissionType::DEFAULT,
20759    };
20760    #[cfg(feature = "arbitrary")]
20761    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20762        use arbitrary::{Arbitrary, Unstructured};
20763        let mut buf = [0u8; 1024];
20764        rng.fill_bytes(&mut buf);
20765        let mut unstructured = Unstructured::new(&buf);
20766        Self::arbitrary(&mut unstructured).unwrap_or_default()
20767    }
20768}
20769impl Default for MISSION_REQUEST_LIST_DATA {
20770    fn default() -> Self {
20771        Self::DEFAULT.clone()
20772    }
20773}
20774impl MessageData for MISSION_REQUEST_LIST_DATA {
20775    type Message = MavMessage;
20776    const ID: u32 = 43u32;
20777    const NAME: &'static str = "MISSION_REQUEST_LIST";
20778    const EXTRA_CRC: u8 = 132u8;
20779    const ENCODED_LEN: usize = 3usize;
20780    fn deser(
20781        _version: MavlinkVersion,
20782        __input: &[u8],
20783    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20784        let avail_len = __input.len();
20785        let mut payload_buf = [0; Self::ENCODED_LEN];
20786        let mut buf = if avail_len < Self::ENCODED_LEN {
20787            payload_buf[0..avail_len].copy_from_slice(__input);
20788            Bytes::new(&payload_buf)
20789        } else {
20790            Bytes::new(__input)
20791        };
20792        let mut __struct = Self::default();
20793        __struct.target_system = buf.get_u8();
20794        __struct.target_component = buf.get_u8();
20795        let tmp = buf.get_u8();
20796        __struct.mission_type =
20797            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20798                enum_type: "MavMissionType",
20799                value: tmp as u32,
20800            })?;
20801        Ok(__struct)
20802    }
20803    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20804        let mut __tmp = BytesMut::new(bytes);
20805        #[allow(clippy::absurd_extreme_comparisons)]
20806        #[allow(unused_comparisons)]
20807        if __tmp.remaining() < Self::ENCODED_LEN {
20808            panic!(
20809                "buffer is too small (need {} bytes, but got {})",
20810                Self::ENCODED_LEN,
20811                __tmp.remaining(),
20812            )
20813        }
20814        __tmp.put_u8(self.target_system);
20815        __tmp.put_u8(self.target_component);
20816        if matches!(version, MavlinkVersion::V2) {
20817            __tmp.put_u8(self.mission_type as u8);
20818            let len = __tmp.len();
20819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20820        } else {
20821            __tmp.len()
20822        }
20823    }
20824}
20825#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20826#[doc = ""]
20827#[doc = "ID: 37"]
20828#[derive(Debug, Clone, PartialEq)]
20829#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20831#[cfg_attr(feature = "ts", derive(TS))]
20832#[cfg_attr(feature = "ts", ts(export))]
20833pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20834    #[doc = "Start index"]
20835    pub start_index: i16,
20836    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20837    pub end_index: i16,
20838    #[doc = "System ID"]
20839    pub target_system: u8,
20840    #[doc = "Component ID"]
20841    pub target_component: u8,
20842    #[doc = "Mission type."]
20843    #[cfg_attr(feature = "serde", serde(default))]
20844    pub mission_type: MavMissionType,
20845}
20846impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20847    pub const ENCODED_LEN: usize = 7usize;
20848    pub const DEFAULT: Self = Self {
20849        start_index: 0_i16,
20850        end_index: 0_i16,
20851        target_system: 0_u8,
20852        target_component: 0_u8,
20853        mission_type: MavMissionType::DEFAULT,
20854    };
20855    #[cfg(feature = "arbitrary")]
20856    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20857        use arbitrary::{Arbitrary, Unstructured};
20858        let mut buf = [0u8; 1024];
20859        rng.fill_bytes(&mut buf);
20860        let mut unstructured = Unstructured::new(&buf);
20861        Self::arbitrary(&mut unstructured).unwrap_or_default()
20862    }
20863}
20864impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20865    fn default() -> Self {
20866        Self::DEFAULT.clone()
20867    }
20868}
20869impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20870    type Message = MavMessage;
20871    const ID: u32 = 37u32;
20872    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20873    const EXTRA_CRC: u8 = 212u8;
20874    const ENCODED_LEN: usize = 7usize;
20875    fn deser(
20876        _version: MavlinkVersion,
20877        __input: &[u8],
20878    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20879        let avail_len = __input.len();
20880        let mut payload_buf = [0; Self::ENCODED_LEN];
20881        let mut buf = if avail_len < Self::ENCODED_LEN {
20882            payload_buf[0..avail_len].copy_from_slice(__input);
20883            Bytes::new(&payload_buf)
20884        } else {
20885            Bytes::new(__input)
20886        };
20887        let mut __struct = Self::default();
20888        __struct.start_index = buf.get_i16_le();
20889        __struct.end_index = buf.get_i16_le();
20890        __struct.target_system = buf.get_u8();
20891        __struct.target_component = buf.get_u8();
20892        let tmp = buf.get_u8();
20893        __struct.mission_type =
20894            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20895                enum_type: "MavMissionType",
20896                value: tmp as u32,
20897            })?;
20898        Ok(__struct)
20899    }
20900    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20901        let mut __tmp = BytesMut::new(bytes);
20902        #[allow(clippy::absurd_extreme_comparisons)]
20903        #[allow(unused_comparisons)]
20904        if __tmp.remaining() < Self::ENCODED_LEN {
20905            panic!(
20906                "buffer is too small (need {} bytes, but got {})",
20907                Self::ENCODED_LEN,
20908                __tmp.remaining(),
20909            )
20910        }
20911        __tmp.put_i16_le(self.start_index);
20912        __tmp.put_i16_le(self.end_index);
20913        __tmp.put_u8(self.target_system);
20914        __tmp.put_u8(self.target_component);
20915        if matches!(version, MavlinkVersion::V2) {
20916            __tmp.put_u8(self.mission_type as u8);
20917            let len = __tmp.len();
20918            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20919        } else {
20920            __tmp.len()
20921        }
20922    }
20923}
20924#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20925#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20926#[doc = ""]
20927#[doc = "ID: 41"]
20928#[derive(Debug, Clone, PartialEq)]
20929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20931#[cfg_attr(feature = "ts", derive(TS))]
20932#[cfg_attr(feature = "ts", ts(export))]
20933pub struct MISSION_SET_CURRENT_DATA {
20934    #[doc = "Sequence"]
20935    pub seq: u16,
20936    #[doc = "System ID"]
20937    pub target_system: u8,
20938    #[doc = "Component ID"]
20939    pub target_component: u8,
20940}
20941impl MISSION_SET_CURRENT_DATA {
20942    pub const ENCODED_LEN: usize = 4usize;
20943    pub const DEFAULT: Self = Self {
20944        seq: 0_u16,
20945        target_system: 0_u8,
20946        target_component: 0_u8,
20947    };
20948    #[cfg(feature = "arbitrary")]
20949    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20950        use arbitrary::{Arbitrary, Unstructured};
20951        let mut buf = [0u8; 1024];
20952        rng.fill_bytes(&mut buf);
20953        let mut unstructured = Unstructured::new(&buf);
20954        Self::arbitrary(&mut unstructured).unwrap_or_default()
20955    }
20956}
20957impl Default for MISSION_SET_CURRENT_DATA {
20958    fn default() -> Self {
20959        Self::DEFAULT.clone()
20960    }
20961}
20962impl MessageData for MISSION_SET_CURRENT_DATA {
20963    type Message = MavMessage;
20964    const ID: u32 = 41u32;
20965    const NAME: &'static str = "MISSION_SET_CURRENT";
20966    const EXTRA_CRC: u8 = 28u8;
20967    const ENCODED_LEN: usize = 4usize;
20968    fn deser(
20969        _version: MavlinkVersion,
20970        __input: &[u8],
20971    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20972        let avail_len = __input.len();
20973        let mut payload_buf = [0; Self::ENCODED_LEN];
20974        let mut buf = if avail_len < Self::ENCODED_LEN {
20975            payload_buf[0..avail_len].copy_from_slice(__input);
20976            Bytes::new(&payload_buf)
20977        } else {
20978            Bytes::new(__input)
20979        };
20980        let mut __struct = Self::default();
20981        __struct.seq = buf.get_u16_le();
20982        __struct.target_system = buf.get_u8();
20983        __struct.target_component = buf.get_u8();
20984        Ok(__struct)
20985    }
20986    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20987        let mut __tmp = BytesMut::new(bytes);
20988        #[allow(clippy::absurd_extreme_comparisons)]
20989        #[allow(unused_comparisons)]
20990        if __tmp.remaining() < Self::ENCODED_LEN {
20991            panic!(
20992                "buffer is too small (need {} bytes, but got {})",
20993                Self::ENCODED_LEN,
20994                __tmp.remaining(),
20995            )
20996        }
20997        __tmp.put_u16_le(self.seq);
20998        __tmp.put_u8(self.target_system);
20999        __tmp.put_u8(self.target_component);
21000        if matches!(version, MavlinkVersion::V2) {
21001            let len = __tmp.len();
21002            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21003        } else {
21004            __tmp.len()
21005        }
21006    }
21007}
21008#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
21009#[doc = ""]
21010#[doc = "ID: 38"]
21011#[derive(Debug, Clone, PartialEq)]
21012#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21013#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21014#[cfg_attr(feature = "ts", derive(TS))]
21015#[cfg_attr(feature = "ts", ts(export))]
21016pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
21017    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
21018    pub start_index: i16,
21019    #[doc = "End index, equal or greater than start index."]
21020    pub end_index: i16,
21021    #[doc = "System ID"]
21022    pub target_system: u8,
21023    #[doc = "Component ID"]
21024    pub target_component: u8,
21025    #[doc = "Mission type."]
21026    #[cfg_attr(feature = "serde", serde(default))]
21027    pub mission_type: MavMissionType,
21028}
21029impl MISSION_WRITE_PARTIAL_LIST_DATA {
21030    pub const ENCODED_LEN: usize = 7usize;
21031    pub const DEFAULT: Self = Self {
21032        start_index: 0_i16,
21033        end_index: 0_i16,
21034        target_system: 0_u8,
21035        target_component: 0_u8,
21036        mission_type: MavMissionType::DEFAULT,
21037    };
21038    #[cfg(feature = "arbitrary")]
21039    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21040        use arbitrary::{Arbitrary, Unstructured};
21041        let mut buf = [0u8; 1024];
21042        rng.fill_bytes(&mut buf);
21043        let mut unstructured = Unstructured::new(&buf);
21044        Self::arbitrary(&mut unstructured).unwrap_or_default()
21045    }
21046}
21047impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
21048    fn default() -> Self {
21049        Self::DEFAULT.clone()
21050    }
21051}
21052impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
21053    type Message = MavMessage;
21054    const ID: u32 = 38u32;
21055    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
21056    const EXTRA_CRC: u8 = 9u8;
21057    const ENCODED_LEN: usize = 7usize;
21058    fn deser(
21059        _version: MavlinkVersion,
21060        __input: &[u8],
21061    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21062        let avail_len = __input.len();
21063        let mut payload_buf = [0; Self::ENCODED_LEN];
21064        let mut buf = if avail_len < Self::ENCODED_LEN {
21065            payload_buf[0..avail_len].copy_from_slice(__input);
21066            Bytes::new(&payload_buf)
21067        } else {
21068            Bytes::new(__input)
21069        };
21070        let mut __struct = Self::default();
21071        __struct.start_index = buf.get_i16_le();
21072        __struct.end_index = buf.get_i16_le();
21073        __struct.target_system = buf.get_u8();
21074        __struct.target_component = buf.get_u8();
21075        let tmp = buf.get_u8();
21076        __struct.mission_type =
21077            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21078                enum_type: "MavMissionType",
21079                value: tmp as u32,
21080            })?;
21081        Ok(__struct)
21082    }
21083    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21084        let mut __tmp = BytesMut::new(bytes);
21085        #[allow(clippy::absurd_extreme_comparisons)]
21086        #[allow(unused_comparisons)]
21087        if __tmp.remaining() < Self::ENCODED_LEN {
21088            panic!(
21089                "buffer is too small (need {} bytes, but got {})",
21090                Self::ENCODED_LEN,
21091                __tmp.remaining(),
21092            )
21093        }
21094        __tmp.put_i16_le(self.start_index);
21095        __tmp.put_i16_le(self.end_index);
21096        __tmp.put_u8(self.target_system);
21097        __tmp.put_u8(self.target_component);
21098        if matches!(version, MavlinkVersion::V2) {
21099            __tmp.put_u8(self.mission_type as u8);
21100            let len = __tmp.len();
21101            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21102        } else {
21103            __tmp.len()
21104        }
21105    }
21106}
21107#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
21108#[doc = "Orientation of a mount."]
21109#[doc = ""]
21110#[doc = "ID: 265"]
21111#[derive(Debug, Clone, PartialEq)]
21112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21113#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21114#[cfg_attr(feature = "ts", derive(TS))]
21115#[cfg_attr(feature = "ts", ts(export))]
21116pub struct MOUNT_ORIENTATION_DATA {
21117    #[doc = "Timestamp (time since system boot)."]
21118    pub time_boot_ms: u32,
21119    #[doc = "Roll in global frame (set to NaN for invalid)."]
21120    pub roll: f32,
21121    #[doc = "Pitch in global frame (set to NaN for invalid)."]
21122    pub pitch: f32,
21123    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
21124    pub yaw: f32,
21125    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
21126    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21127    pub yaw_absolute: f32,
21128}
21129impl MOUNT_ORIENTATION_DATA {
21130    pub const ENCODED_LEN: usize = 20usize;
21131    pub const DEFAULT: Self = Self {
21132        time_boot_ms: 0_u32,
21133        roll: 0.0_f32,
21134        pitch: 0.0_f32,
21135        yaw: 0.0_f32,
21136        yaw_absolute: 0.0_f32,
21137    };
21138    #[cfg(feature = "arbitrary")]
21139    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21140        use arbitrary::{Arbitrary, Unstructured};
21141        let mut buf = [0u8; 1024];
21142        rng.fill_bytes(&mut buf);
21143        let mut unstructured = Unstructured::new(&buf);
21144        Self::arbitrary(&mut unstructured).unwrap_or_default()
21145    }
21146}
21147impl Default for MOUNT_ORIENTATION_DATA {
21148    fn default() -> Self {
21149        Self::DEFAULT.clone()
21150    }
21151}
21152impl MessageData for MOUNT_ORIENTATION_DATA {
21153    type Message = MavMessage;
21154    const ID: u32 = 265u32;
21155    const NAME: &'static str = "MOUNT_ORIENTATION";
21156    const EXTRA_CRC: u8 = 26u8;
21157    const ENCODED_LEN: usize = 20usize;
21158    fn deser(
21159        _version: MavlinkVersion,
21160        __input: &[u8],
21161    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21162        let avail_len = __input.len();
21163        let mut payload_buf = [0; Self::ENCODED_LEN];
21164        let mut buf = if avail_len < Self::ENCODED_LEN {
21165            payload_buf[0..avail_len].copy_from_slice(__input);
21166            Bytes::new(&payload_buf)
21167        } else {
21168            Bytes::new(__input)
21169        };
21170        let mut __struct = Self::default();
21171        __struct.time_boot_ms = buf.get_u32_le();
21172        __struct.roll = buf.get_f32_le();
21173        __struct.pitch = buf.get_f32_le();
21174        __struct.yaw = buf.get_f32_le();
21175        __struct.yaw_absolute = buf.get_f32_le();
21176        Ok(__struct)
21177    }
21178    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21179        let mut __tmp = BytesMut::new(bytes);
21180        #[allow(clippy::absurd_extreme_comparisons)]
21181        #[allow(unused_comparisons)]
21182        if __tmp.remaining() < Self::ENCODED_LEN {
21183            panic!(
21184                "buffer is too small (need {} bytes, but got {})",
21185                Self::ENCODED_LEN,
21186                __tmp.remaining(),
21187            )
21188        }
21189        __tmp.put_u32_le(self.time_boot_ms);
21190        __tmp.put_f32_le(self.roll);
21191        __tmp.put_f32_le(self.pitch);
21192        __tmp.put_f32_le(self.yaw);
21193        if matches!(version, MavlinkVersion::V2) {
21194            __tmp.put_f32_le(self.yaw_absolute);
21195            let len = __tmp.len();
21196            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21197        } else {
21198            __tmp.len()
21199        }
21200    }
21201}
21202#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21203#[doc = ""]
21204#[doc = "ID: 251"]
21205#[derive(Debug, Clone, PartialEq)]
21206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21207#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21208#[cfg_attr(feature = "ts", derive(TS))]
21209#[cfg_attr(feature = "ts", ts(export))]
21210pub struct NAMED_VALUE_FLOAT_DATA {
21211    #[doc = "Timestamp (time since system boot)."]
21212    pub time_boot_ms: u32,
21213    #[doc = "Floating point value"]
21214    pub value: f32,
21215    #[doc = "Name of the debug variable"]
21216    #[cfg_attr(
21217        feature = "serde",
21218        serde(
21219            serialize_with = "crate::nulstr::serialize::<_, 10>",
21220            deserialize_with = "crate::nulstr::deserialize::<_, 10>"
21221        )
21222    )]
21223    #[cfg_attr(feature = "ts", ts(type = "string"))]
21224    pub name: [u8; 10],
21225}
21226impl NAMED_VALUE_FLOAT_DATA {
21227    pub const ENCODED_LEN: usize = 18usize;
21228    pub const DEFAULT: Self = Self {
21229        time_boot_ms: 0_u32,
21230        value: 0.0_f32,
21231        name: [0_u8; 10usize],
21232    };
21233    #[cfg(feature = "arbitrary")]
21234    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21235        use arbitrary::{Arbitrary, Unstructured};
21236        let mut buf = [0u8; 1024];
21237        rng.fill_bytes(&mut buf);
21238        let mut unstructured = Unstructured::new(&buf);
21239        Self::arbitrary(&mut unstructured).unwrap_or_default()
21240    }
21241}
21242impl Default for NAMED_VALUE_FLOAT_DATA {
21243    fn default() -> Self {
21244        Self::DEFAULT.clone()
21245    }
21246}
21247impl MessageData for NAMED_VALUE_FLOAT_DATA {
21248    type Message = MavMessage;
21249    const ID: u32 = 251u32;
21250    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21251    const EXTRA_CRC: u8 = 170u8;
21252    const ENCODED_LEN: usize = 18usize;
21253    fn deser(
21254        _version: MavlinkVersion,
21255        __input: &[u8],
21256    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21257        let avail_len = __input.len();
21258        let mut payload_buf = [0; Self::ENCODED_LEN];
21259        let mut buf = if avail_len < Self::ENCODED_LEN {
21260            payload_buf[0..avail_len].copy_from_slice(__input);
21261            Bytes::new(&payload_buf)
21262        } else {
21263            Bytes::new(__input)
21264        };
21265        let mut __struct = Self::default();
21266        __struct.time_boot_ms = buf.get_u32_le();
21267        __struct.value = buf.get_f32_le();
21268        for v in &mut __struct.name {
21269            let val = buf.get_u8();
21270            *v = val;
21271        }
21272        Ok(__struct)
21273    }
21274    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21275        let mut __tmp = BytesMut::new(bytes);
21276        #[allow(clippy::absurd_extreme_comparisons)]
21277        #[allow(unused_comparisons)]
21278        if __tmp.remaining() < Self::ENCODED_LEN {
21279            panic!(
21280                "buffer is too small (need {} bytes, but got {})",
21281                Self::ENCODED_LEN,
21282                __tmp.remaining(),
21283            )
21284        }
21285        __tmp.put_u32_le(self.time_boot_ms);
21286        __tmp.put_f32_le(self.value);
21287        for val in &self.name {
21288            __tmp.put_u8(*val);
21289        }
21290        if matches!(version, MavlinkVersion::V2) {
21291            let len = __tmp.len();
21292            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21293        } else {
21294            __tmp.len()
21295        }
21296    }
21297}
21298#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21299#[doc = ""]
21300#[doc = "ID: 252"]
21301#[derive(Debug, Clone, PartialEq)]
21302#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21304#[cfg_attr(feature = "ts", derive(TS))]
21305#[cfg_attr(feature = "ts", ts(export))]
21306pub struct NAMED_VALUE_INT_DATA {
21307    #[doc = "Timestamp (time since system boot)."]
21308    pub time_boot_ms: u32,
21309    #[doc = "Signed integer value"]
21310    pub value: i32,
21311    #[doc = "Name of the debug variable"]
21312    #[cfg_attr(
21313        feature = "serde",
21314        serde(
21315            serialize_with = "crate::nulstr::serialize::<_, 10>",
21316            deserialize_with = "crate::nulstr::deserialize::<_, 10>"
21317        )
21318    )]
21319    #[cfg_attr(feature = "ts", ts(type = "string"))]
21320    pub name: [u8; 10],
21321}
21322impl NAMED_VALUE_INT_DATA {
21323    pub const ENCODED_LEN: usize = 18usize;
21324    pub const DEFAULT: Self = Self {
21325        time_boot_ms: 0_u32,
21326        value: 0_i32,
21327        name: [0_u8; 10usize],
21328    };
21329    #[cfg(feature = "arbitrary")]
21330    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21331        use arbitrary::{Arbitrary, Unstructured};
21332        let mut buf = [0u8; 1024];
21333        rng.fill_bytes(&mut buf);
21334        let mut unstructured = Unstructured::new(&buf);
21335        Self::arbitrary(&mut unstructured).unwrap_or_default()
21336    }
21337}
21338impl Default for NAMED_VALUE_INT_DATA {
21339    fn default() -> Self {
21340        Self::DEFAULT.clone()
21341    }
21342}
21343impl MessageData for NAMED_VALUE_INT_DATA {
21344    type Message = MavMessage;
21345    const ID: u32 = 252u32;
21346    const NAME: &'static str = "NAMED_VALUE_INT";
21347    const EXTRA_CRC: u8 = 44u8;
21348    const ENCODED_LEN: usize = 18usize;
21349    fn deser(
21350        _version: MavlinkVersion,
21351        __input: &[u8],
21352    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21353        let avail_len = __input.len();
21354        let mut payload_buf = [0; Self::ENCODED_LEN];
21355        let mut buf = if avail_len < Self::ENCODED_LEN {
21356            payload_buf[0..avail_len].copy_from_slice(__input);
21357            Bytes::new(&payload_buf)
21358        } else {
21359            Bytes::new(__input)
21360        };
21361        let mut __struct = Self::default();
21362        __struct.time_boot_ms = buf.get_u32_le();
21363        __struct.value = buf.get_i32_le();
21364        for v in &mut __struct.name {
21365            let val = buf.get_u8();
21366            *v = val;
21367        }
21368        Ok(__struct)
21369    }
21370    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21371        let mut __tmp = BytesMut::new(bytes);
21372        #[allow(clippy::absurd_extreme_comparisons)]
21373        #[allow(unused_comparisons)]
21374        if __tmp.remaining() < Self::ENCODED_LEN {
21375            panic!(
21376                "buffer is too small (need {} bytes, but got {})",
21377                Self::ENCODED_LEN,
21378                __tmp.remaining(),
21379            )
21380        }
21381        __tmp.put_u32_le(self.time_boot_ms);
21382        __tmp.put_i32_le(self.value);
21383        for val in &self.name {
21384            __tmp.put_u8(*val);
21385        }
21386        if matches!(version, MavlinkVersion::V2) {
21387            let len = __tmp.len();
21388            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21389        } else {
21390            __tmp.len()
21391        }
21392    }
21393}
21394#[doc = "The state of the navigation and position controller."]
21395#[doc = ""]
21396#[doc = "ID: 62"]
21397#[derive(Debug, Clone, PartialEq)]
21398#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21399#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21400#[cfg_attr(feature = "ts", derive(TS))]
21401#[cfg_attr(feature = "ts", ts(export))]
21402pub struct NAV_CONTROLLER_OUTPUT_DATA {
21403    #[doc = "Current desired roll"]
21404    pub nav_roll: f32,
21405    #[doc = "Current desired pitch"]
21406    pub nav_pitch: f32,
21407    #[doc = "Current altitude error"]
21408    pub alt_error: f32,
21409    #[doc = "Current airspeed error"]
21410    pub aspd_error: f32,
21411    #[doc = "Current crosstrack error on x-y plane"]
21412    pub xtrack_error: f32,
21413    #[doc = "Current desired heading"]
21414    pub nav_bearing: i16,
21415    #[doc = "Bearing to current waypoint/target"]
21416    pub target_bearing: i16,
21417    #[doc = "Distance to active waypoint"]
21418    pub wp_dist: u16,
21419}
21420impl NAV_CONTROLLER_OUTPUT_DATA {
21421    pub const ENCODED_LEN: usize = 26usize;
21422    pub const DEFAULT: Self = Self {
21423        nav_roll: 0.0_f32,
21424        nav_pitch: 0.0_f32,
21425        alt_error: 0.0_f32,
21426        aspd_error: 0.0_f32,
21427        xtrack_error: 0.0_f32,
21428        nav_bearing: 0_i16,
21429        target_bearing: 0_i16,
21430        wp_dist: 0_u16,
21431    };
21432    #[cfg(feature = "arbitrary")]
21433    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21434        use arbitrary::{Arbitrary, Unstructured};
21435        let mut buf = [0u8; 1024];
21436        rng.fill_bytes(&mut buf);
21437        let mut unstructured = Unstructured::new(&buf);
21438        Self::arbitrary(&mut unstructured).unwrap_or_default()
21439    }
21440}
21441impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21442    fn default() -> Self {
21443        Self::DEFAULT.clone()
21444    }
21445}
21446impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21447    type Message = MavMessage;
21448    const ID: u32 = 62u32;
21449    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21450    const EXTRA_CRC: u8 = 183u8;
21451    const ENCODED_LEN: usize = 26usize;
21452    fn deser(
21453        _version: MavlinkVersion,
21454        __input: &[u8],
21455    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21456        let avail_len = __input.len();
21457        let mut payload_buf = [0; Self::ENCODED_LEN];
21458        let mut buf = if avail_len < Self::ENCODED_LEN {
21459            payload_buf[0..avail_len].copy_from_slice(__input);
21460            Bytes::new(&payload_buf)
21461        } else {
21462            Bytes::new(__input)
21463        };
21464        let mut __struct = Self::default();
21465        __struct.nav_roll = buf.get_f32_le();
21466        __struct.nav_pitch = buf.get_f32_le();
21467        __struct.alt_error = buf.get_f32_le();
21468        __struct.aspd_error = buf.get_f32_le();
21469        __struct.xtrack_error = buf.get_f32_le();
21470        __struct.nav_bearing = buf.get_i16_le();
21471        __struct.target_bearing = buf.get_i16_le();
21472        __struct.wp_dist = buf.get_u16_le();
21473        Ok(__struct)
21474    }
21475    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21476        let mut __tmp = BytesMut::new(bytes);
21477        #[allow(clippy::absurd_extreme_comparisons)]
21478        #[allow(unused_comparisons)]
21479        if __tmp.remaining() < Self::ENCODED_LEN {
21480            panic!(
21481                "buffer is too small (need {} bytes, but got {})",
21482                Self::ENCODED_LEN,
21483                __tmp.remaining(),
21484            )
21485        }
21486        __tmp.put_f32_le(self.nav_roll);
21487        __tmp.put_f32_le(self.nav_pitch);
21488        __tmp.put_f32_le(self.alt_error);
21489        __tmp.put_f32_le(self.aspd_error);
21490        __tmp.put_f32_le(self.xtrack_error);
21491        __tmp.put_i16_le(self.nav_bearing);
21492        __tmp.put_i16_le(self.target_bearing);
21493        __tmp.put_u16_le(self.wp_dist);
21494        if matches!(version, MavlinkVersion::V2) {
21495            let len = __tmp.len();
21496            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21497        } else {
21498            __tmp.len()
21499        }
21500    }
21501}
21502#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21503#[doc = ""]
21504#[doc = "ID: 330"]
21505#[derive(Debug, Clone, PartialEq)]
21506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21508#[cfg_attr(feature = "ts", derive(TS))]
21509#[cfg_attr(feature = "ts", ts(export))]
21510pub struct OBSTACLE_DISTANCE_DATA {
21511    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21512    pub time_usec: u64,
21513    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21514    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21515    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21516    pub distances: [u16; 72],
21517    #[doc = "Minimum distance the sensor can measure."]
21518    pub min_distance: u16,
21519    #[doc = "Maximum distance the sensor can measure."]
21520    pub max_distance: u16,
21521    #[doc = "Class id of the distance sensor type."]
21522    pub sensor_type: MavDistanceSensor,
21523    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21524    pub increment: u8,
21525    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21526    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21527    pub increment_f: f32,
21528    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21529    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21530    pub angle_offset: f32,
21531    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21532    #[cfg_attr(feature = "serde", serde(default))]
21533    pub frame: MavFrame,
21534}
21535impl OBSTACLE_DISTANCE_DATA {
21536    pub const ENCODED_LEN: usize = 167usize;
21537    pub const DEFAULT: Self = Self {
21538        time_usec: 0_u64,
21539        distances: [0_u16; 72usize],
21540        min_distance: 0_u16,
21541        max_distance: 0_u16,
21542        sensor_type: MavDistanceSensor::DEFAULT,
21543        increment: 0_u8,
21544        increment_f: 0.0_f32,
21545        angle_offset: 0.0_f32,
21546        frame: MavFrame::DEFAULT,
21547    };
21548    #[cfg(feature = "arbitrary")]
21549    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21550        use arbitrary::{Arbitrary, Unstructured};
21551        let mut buf = [0u8; 1024];
21552        rng.fill_bytes(&mut buf);
21553        let mut unstructured = Unstructured::new(&buf);
21554        Self::arbitrary(&mut unstructured).unwrap_or_default()
21555    }
21556}
21557impl Default for OBSTACLE_DISTANCE_DATA {
21558    fn default() -> Self {
21559        Self::DEFAULT.clone()
21560    }
21561}
21562impl MessageData for OBSTACLE_DISTANCE_DATA {
21563    type Message = MavMessage;
21564    const ID: u32 = 330u32;
21565    const NAME: &'static str = "OBSTACLE_DISTANCE";
21566    const EXTRA_CRC: u8 = 23u8;
21567    const ENCODED_LEN: usize = 167usize;
21568    fn deser(
21569        _version: MavlinkVersion,
21570        __input: &[u8],
21571    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21572        let avail_len = __input.len();
21573        let mut payload_buf = [0; Self::ENCODED_LEN];
21574        let mut buf = if avail_len < Self::ENCODED_LEN {
21575            payload_buf[0..avail_len].copy_from_slice(__input);
21576            Bytes::new(&payload_buf)
21577        } else {
21578            Bytes::new(__input)
21579        };
21580        let mut __struct = Self::default();
21581        __struct.time_usec = buf.get_u64_le();
21582        for v in &mut __struct.distances {
21583            let val = buf.get_u16_le();
21584            *v = val;
21585        }
21586        __struct.min_distance = buf.get_u16_le();
21587        __struct.max_distance = buf.get_u16_le();
21588        let tmp = buf.get_u8();
21589        __struct.sensor_type =
21590            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21591                enum_type: "MavDistanceSensor",
21592                value: tmp as u32,
21593            })?;
21594        __struct.increment = buf.get_u8();
21595        __struct.increment_f = buf.get_f32_le();
21596        __struct.angle_offset = buf.get_f32_le();
21597        let tmp = buf.get_u8();
21598        __struct.frame =
21599            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21600                enum_type: "MavFrame",
21601                value: tmp as u32,
21602            })?;
21603        Ok(__struct)
21604    }
21605    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21606        let mut __tmp = BytesMut::new(bytes);
21607        #[allow(clippy::absurd_extreme_comparisons)]
21608        #[allow(unused_comparisons)]
21609        if __tmp.remaining() < Self::ENCODED_LEN {
21610            panic!(
21611                "buffer is too small (need {} bytes, but got {})",
21612                Self::ENCODED_LEN,
21613                __tmp.remaining(),
21614            )
21615        }
21616        __tmp.put_u64_le(self.time_usec);
21617        for val in &self.distances {
21618            __tmp.put_u16_le(*val);
21619        }
21620        __tmp.put_u16_le(self.min_distance);
21621        __tmp.put_u16_le(self.max_distance);
21622        __tmp.put_u8(self.sensor_type as u8);
21623        __tmp.put_u8(self.increment);
21624        if matches!(version, MavlinkVersion::V2) {
21625            __tmp.put_f32_le(self.increment_f);
21626            __tmp.put_f32_le(self.angle_offset);
21627            __tmp.put_u8(self.frame as u8);
21628            let len = __tmp.len();
21629            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21630        } else {
21631            __tmp.len()
21632        }
21633    }
21634}
21635#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21636#[doc = ""]
21637#[doc = "ID: 331"]
21638#[derive(Debug, Clone, PartialEq)]
21639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21641#[cfg_attr(feature = "ts", derive(TS))]
21642#[cfg_attr(feature = "ts", ts(export))]
21643pub struct ODOMETRY_DATA {
21644    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21645    pub time_usec: u64,
21646    #[doc = "X Position"]
21647    pub x: f32,
21648    #[doc = "Y Position"]
21649    pub y: f32,
21650    #[doc = "Z Position"]
21651    pub z: f32,
21652    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21653    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21654    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21655    pub q: [f32; 4],
21656    #[doc = "X linear speed"]
21657    pub vx: f32,
21658    #[doc = "Y linear speed"]
21659    pub vy: f32,
21660    #[doc = "Z linear speed"]
21661    pub vz: f32,
21662    #[doc = "Roll angular speed"]
21663    pub rollspeed: f32,
21664    #[doc = "Pitch angular speed"]
21665    pub pitchspeed: f32,
21666    #[doc = "Yaw angular speed"]
21667    pub yawspeed: f32,
21668    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21669    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21670    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21671    pub pose_covariance: [f32; 21],
21672    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21673    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21674    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21675    pub velocity_covariance: [f32; 21],
21676    #[doc = "Coordinate frame of reference for the pose data."]
21677    pub frame_id: MavFrame,
21678    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21679    pub child_frame_id: MavFrame,
21680    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21681    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21682    pub reset_counter: u8,
21683    #[doc = "Type of estimator that is providing the odometry."]
21684    #[cfg_attr(feature = "serde", serde(default))]
21685    pub estimator_type: MavEstimatorType,
21686    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21687    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21688    pub quality: i8,
21689}
21690impl ODOMETRY_DATA {
21691    pub const ENCODED_LEN: usize = 233usize;
21692    pub const DEFAULT: Self = Self {
21693        time_usec: 0_u64,
21694        x: 0.0_f32,
21695        y: 0.0_f32,
21696        z: 0.0_f32,
21697        q: [0.0_f32; 4usize],
21698        vx: 0.0_f32,
21699        vy: 0.0_f32,
21700        vz: 0.0_f32,
21701        rollspeed: 0.0_f32,
21702        pitchspeed: 0.0_f32,
21703        yawspeed: 0.0_f32,
21704        pose_covariance: [0.0_f32; 21usize],
21705        velocity_covariance: [0.0_f32; 21usize],
21706        frame_id: MavFrame::DEFAULT,
21707        child_frame_id: MavFrame::DEFAULT,
21708        reset_counter: 0_u8,
21709        estimator_type: MavEstimatorType::DEFAULT,
21710        quality: 0_i8,
21711    };
21712    #[cfg(feature = "arbitrary")]
21713    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21714        use arbitrary::{Arbitrary, Unstructured};
21715        let mut buf = [0u8; 1024];
21716        rng.fill_bytes(&mut buf);
21717        let mut unstructured = Unstructured::new(&buf);
21718        Self::arbitrary(&mut unstructured).unwrap_or_default()
21719    }
21720}
21721impl Default for ODOMETRY_DATA {
21722    fn default() -> Self {
21723        Self::DEFAULT.clone()
21724    }
21725}
21726impl MessageData for ODOMETRY_DATA {
21727    type Message = MavMessage;
21728    const ID: u32 = 331u32;
21729    const NAME: &'static str = "ODOMETRY";
21730    const EXTRA_CRC: u8 = 91u8;
21731    const ENCODED_LEN: usize = 233usize;
21732    fn deser(
21733        _version: MavlinkVersion,
21734        __input: &[u8],
21735    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21736        let avail_len = __input.len();
21737        let mut payload_buf = [0; Self::ENCODED_LEN];
21738        let mut buf = if avail_len < Self::ENCODED_LEN {
21739            payload_buf[0..avail_len].copy_from_slice(__input);
21740            Bytes::new(&payload_buf)
21741        } else {
21742            Bytes::new(__input)
21743        };
21744        let mut __struct = Self::default();
21745        __struct.time_usec = buf.get_u64_le();
21746        __struct.x = buf.get_f32_le();
21747        __struct.y = buf.get_f32_le();
21748        __struct.z = buf.get_f32_le();
21749        for v in &mut __struct.q {
21750            let val = buf.get_f32_le();
21751            *v = val;
21752        }
21753        __struct.vx = buf.get_f32_le();
21754        __struct.vy = buf.get_f32_le();
21755        __struct.vz = buf.get_f32_le();
21756        __struct.rollspeed = buf.get_f32_le();
21757        __struct.pitchspeed = buf.get_f32_le();
21758        __struct.yawspeed = buf.get_f32_le();
21759        for v in &mut __struct.pose_covariance {
21760            let val = buf.get_f32_le();
21761            *v = val;
21762        }
21763        for v in &mut __struct.velocity_covariance {
21764            let val = buf.get_f32_le();
21765            *v = val;
21766        }
21767        let tmp = buf.get_u8();
21768        __struct.frame_id =
21769            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21770                enum_type: "MavFrame",
21771                value: tmp as u32,
21772            })?;
21773        let tmp = buf.get_u8();
21774        __struct.child_frame_id =
21775            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21776                enum_type: "MavFrame",
21777                value: tmp as u32,
21778            })?;
21779        __struct.reset_counter = buf.get_u8();
21780        let tmp = buf.get_u8();
21781        __struct.estimator_type =
21782            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21783                enum_type: "MavEstimatorType",
21784                value: tmp as u32,
21785            })?;
21786        __struct.quality = buf.get_i8();
21787        Ok(__struct)
21788    }
21789    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21790        let mut __tmp = BytesMut::new(bytes);
21791        #[allow(clippy::absurd_extreme_comparisons)]
21792        #[allow(unused_comparisons)]
21793        if __tmp.remaining() < Self::ENCODED_LEN {
21794            panic!(
21795                "buffer is too small (need {} bytes, but got {})",
21796                Self::ENCODED_LEN,
21797                __tmp.remaining(),
21798            )
21799        }
21800        __tmp.put_u64_le(self.time_usec);
21801        __tmp.put_f32_le(self.x);
21802        __tmp.put_f32_le(self.y);
21803        __tmp.put_f32_le(self.z);
21804        for val in &self.q {
21805            __tmp.put_f32_le(*val);
21806        }
21807        __tmp.put_f32_le(self.vx);
21808        __tmp.put_f32_le(self.vy);
21809        __tmp.put_f32_le(self.vz);
21810        __tmp.put_f32_le(self.rollspeed);
21811        __tmp.put_f32_le(self.pitchspeed);
21812        __tmp.put_f32_le(self.yawspeed);
21813        for val in &self.pose_covariance {
21814            __tmp.put_f32_le(*val);
21815        }
21816        for val in &self.velocity_covariance {
21817            __tmp.put_f32_le(*val);
21818        }
21819        __tmp.put_u8(self.frame_id as u8);
21820        __tmp.put_u8(self.child_frame_id as u8);
21821        if matches!(version, MavlinkVersion::V2) {
21822            __tmp.put_u8(self.reset_counter);
21823            __tmp.put_u8(self.estimator_type as u8);
21824            __tmp.put_i8(self.quality);
21825            let len = __tmp.len();
21826            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21827        } else {
21828            __tmp.len()
21829        }
21830    }
21831}
21832#[doc = "Hardware status sent by an onboard computer."]
21833#[doc = ""]
21834#[doc = "ID: 390"]
21835#[derive(Debug, Clone, PartialEq)]
21836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21837#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21838#[cfg_attr(feature = "ts", derive(TS))]
21839#[cfg_attr(feature = "ts", ts(export))]
21840pub struct ONBOARD_COMPUTER_STATUS_DATA {
21841    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21842    pub time_usec: u64,
21843    #[doc = "Time since system boot."]
21844    pub uptime: u32,
21845    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21846    pub ram_usage: u32,
21847    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21848    pub ram_total: u32,
21849    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21850    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21851    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21852    pub storage_type: [u32; 4],
21853    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21854    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21855    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21856    pub storage_usage: [u32; 4],
21857    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21858    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21859    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21860    pub storage_total: [u32; 4],
21861    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21862    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21863    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21864    pub link_type: [u32; 6],
21865    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21866    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21867    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21868    pub link_tx_rate: [u32; 6],
21869    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21870    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21871    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21872    pub link_rx_rate: [u32; 6],
21873    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21874    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21875    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21876    pub link_tx_max: [u32; 6],
21877    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21878    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21879    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21880    pub link_rx_max: [u32; 6],
21881    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21882    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21883    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21884    pub fan_speed: [i16; 4],
21885    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21886    pub mavtype: u8,
21887    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21888    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21889    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21890    pub cpu_cores: [u8; 8],
21891    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21892    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21893    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21894    pub cpu_combined: [u8; 10],
21895    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21896    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21897    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21898    pub gpu_cores: [u8; 4],
21899    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21900    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21901    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21902    pub gpu_combined: [u8; 10],
21903    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21904    pub temperature_board: i8,
21905    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21906    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21907    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21908    pub temperature_core: [i8; 8],
21909}
21910impl ONBOARD_COMPUTER_STATUS_DATA {
21911    pub const ENCODED_LEN: usize = 238usize;
21912    pub const DEFAULT: Self = Self {
21913        time_usec: 0_u64,
21914        uptime: 0_u32,
21915        ram_usage: 0_u32,
21916        ram_total: 0_u32,
21917        storage_type: [0_u32; 4usize],
21918        storage_usage: [0_u32; 4usize],
21919        storage_total: [0_u32; 4usize],
21920        link_type: [0_u32; 6usize],
21921        link_tx_rate: [0_u32; 6usize],
21922        link_rx_rate: [0_u32; 6usize],
21923        link_tx_max: [0_u32; 6usize],
21924        link_rx_max: [0_u32; 6usize],
21925        fan_speed: [0_i16; 4usize],
21926        mavtype: 0_u8,
21927        cpu_cores: [0_u8; 8usize],
21928        cpu_combined: [0_u8; 10usize],
21929        gpu_cores: [0_u8; 4usize],
21930        gpu_combined: [0_u8; 10usize],
21931        temperature_board: 0_i8,
21932        temperature_core: [0_i8; 8usize],
21933    };
21934    #[cfg(feature = "arbitrary")]
21935    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21936        use arbitrary::{Arbitrary, Unstructured};
21937        let mut buf = [0u8; 1024];
21938        rng.fill_bytes(&mut buf);
21939        let mut unstructured = Unstructured::new(&buf);
21940        Self::arbitrary(&mut unstructured).unwrap_or_default()
21941    }
21942}
21943impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21944    fn default() -> Self {
21945        Self::DEFAULT.clone()
21946    }
21947}
21948impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21949    type Message = MavMessage;
21950    const ID: u32 = 390u32;
21951    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21952    const EXTRA_CRC: u8 = 156u8;
21953    const ENCODED_LEN: usize = 238usize;
21954    fn deser(
21955        _version: MavlinkVersion,
21956        __input: &[u8],
21957    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21958        let avail_len = __input.len();
21959        let mut payload_buf = [0; Self::ENCODED_LEN];
21960        let mut buf = if avail_len < Self::ENCODED_LEN {
21961            payload_buf[0..avail_len].copy_from_slice(__input);
21962            Bytes::new(&payload_buf)
21963        } else {
21964            Bytes::new(__input)
21965        };
21966        let mut __struct = Self::default();
21967        __struct.time_usec = buf.get_u64_le();
21968        __struct.uptime = buf.get_u32_le();
21969        __struct.ram_usage = buf.get_u32_le();
21970        __struct.ram_total = buf.get_u32_le();
21971        for v in &mut __struct.storage_type {
21972            let val = buf.get_u32_le();
21973            *v = val;
21974        }
21975        for v in &mut __struct.storage_usage {
21976            let val = buf.get_u32_le();
21977            *v = val;
21978        }
21979        for v in &mut __struct.storage_total {
21980            let val = buf.get_u32_le();
21981            *v = val;
21982        }
21983        for v in &mut __struct.link_type {
21984            let val = buf.get_u32_le();
21985            *v = val;
21986        }
21987        for v in &mut __struct.link_tx_rate {
21988            let val = buf.get_u32_le();
21989            *v = val;
21990        }
21991        for v in &mut __struct.link_rx_rate {
21992            let val = buf.get_u32_le();
21993            *v = val;
21994        }
21995        for v in &mut __struct.link_tx_max {
21996            let val = buf.get_u32_le();
21997            *v = val;
21998        }
21999        for v in &mut __struct.link_rx_max {
22000            let val = buf.get_u32_le();
22001            *v = val;
22002        }
22003        for v in &mut __struct.fan_speed {
22004            let val = buf.get_i16_le();
22005            *v = val;
22006        }
22007        __struct.mavtype = buf.get_u8();
22008        for v in &mut __struct.cpu_cores {
22009            let val = buf.get_u8();
22010            *v = val;
22011        }
22012        for v in &mut __struct.cpu_combined {
22013            let val = buf.get_u8();
22014            *v = val;
22015        }
22016        for v in &mut __struct.gpu_cores {
22017            let val = buf.get_u8();
22018            *v = val;
22019        }
22020        for v in &mut __struct.gpu_combined {
22021            let val = buf.get_u8();
22022            *v = val;
22023        }
22024        __struct.temperature_board = buf.get_i8();
22025        for v in &mut __struct.temperature_core {
22026            let val = buf.get_i8();
22027            *v = val;
22028        }
22029        Ok(__struct)
22030    }
22031    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22032        let mut __tmp = BytesMut::new(bytes);
22033        #[allow(clippy::absurd_extreme_comparisons)]
22034        #[allow(unused_comparisons)]
22035        if __tmp.remaining() < Self::ENCODED_LEN {
22036            panic!(
22037                "buffer is too small (need {} bytes, but got {})",
22038                Self::ENCODED_LEN,
22039                __tmp.remaining(),
22040            )
22041        }
22042        __tmp.put_u64_le(self.time_usec);
22043        __tmp.put_u32_le(self.uptime);
22044        __tmp.put_u32_le(self.ram_usage);
22045        __tmp.put_u32_le(self.ram_total);
22046        for val in &self.storage_type {
22047            __tmp.put_u32_le(*val);
22048        }
22049        for val in &self.storage_usage {
22050            __tmp.put_u32_le(*val);
22051        }
22052        for val in &self.storage_total {
22053            __tmp.put_u32_le(*val);
22054        }
22055        for val in &self.link_type {
22056            __tmp.put_u32_le(*val);
22057        }
22058        for val in &self.link_tx_rate {
22059            __tmp.put_u32_le(*val);
22060        }
22061        for val in &self.link_rx_rate {
22062            __tmp.put_u32_le(*val);
22063        }
22064        for val in &self.link_tx_max {
22065            __tmp.put_u32_le(*val);
22066        }
22067        for val in &self.link_rx_max {
22068            __tmp.put_u32_le(*val);
22069        }
22070        for val in &self.fan_speed {
22071            __tmp.put_i16_le(*val);
22072        }
22073        __tmp.put_u8(self.mavtype);
22074        for val in &self.cpu_cores {
22075            __tmp.put_u8(*val);
22076        }
22077        for val in &self.cpu_combined {
22078            __tmp.put_u8(*val);
22079        }
22080        for val in &self.gpu_cores {
22081            __tmp.put_u8(*val);
22082        }
22083        for val in &self.gpu_combined {
22084            __tmp.put_u8(*val);
22085        }
22086        __tmp.put_i8(self.temperature_board);
22087        for val in &self.temperature_core {
22088            __tmp.put_i8(*val);
22089        }
22090        if matches!(version, MavlinkVersion::V2) {
22091            let len = __tmp.len();
22092            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22093        } else {
22094            __tmp.len()
22095        }
22096    }
22097}
22098#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
22099#[doc = ""]
22100#[doc = "ID: 12918"]
22101#[derive(Debug, Clone, PartialEq)]
22102#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22103#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22104#[cfg_attr(feature = "ts", derive(TS))]
22105#[cfg_attr(feature = "ts", ts(export))]
22106pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
22107    #[doc = "Status level indicating if arming is allowed."]
22108    pub status: MavOdidArmStatus,
22109    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
22110    #[cfg_attr(
22111        feature = "serde",
22112        serde(
22113            serialize_with = "crate::nulstr::serialize::<_, 50>",
22114            deserialize_with = "crate::nulstr::deserialize::<_, 50>"
22115        )
22116    )]
22117    #[cfg_attr(feature = "ts", ts(type = "string"))]
22118    pub error: [u8; 50],
22119}
22120impl OPEN_DRONE_ID_ARM_STATUS_DATA {
22121    pub const ENCODED_LEN: usize = 51usize;
22122    pub const DEFAULT: Self = Self {
22123        status: MavOdidArmStatus::DEFAULT,
22124        error: [0_u8; 50usize],
22125    };
22126    #[cfg(feature = "arbitrary")]
22127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22128        use arbitrary::{Arbitrary, Unstructured};
22129        let mut buf = [0u8; 1024];
22130        rng.fill_bytes(&mut buf);
22131        let mut unstructured = Unstructured::new(&buf);
22132        Self::arbitrary(&mut unstructured).unwrap_or_default()
22133    }
22134}
22135impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
22136    fn default() -> Self {
22137        Self::DEFAULT.clone()
22138    }
22139}
22140impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
22141    type Message = MavMessage;
22142    const ID: u32 = 12918u32;
22143    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
22144    const EXTRA_CRC: u8 = 139u8;
22145    const ENCODED_LEN: usize = 51usize;
22146    fn deser(
22147        _version: MavlinkVersion,
22148        __input: &[u8],
22149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22150        let avail_len = __input.len();
22151        let mut payload_buf = [0; Self::ENCODED_LEN];
22152        let mut buf = if avail_len < Self::ENCODED_LEN {
22153            payload_buf[0..avail_len].copy_from_slice(__input);
22154            Bytes::new(&payload_buf)
22155        } else {
22156            Bytes::new(__input)
22157        };
22158        let mut __struct = Self::default();
22159        let tmp = buf.get_u8();
22160        __struct.status =
22161            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22162                enum_type: "MavOdidArmStatus",
22163                value: tmp as u32,
22164            })?;
22165        for v in &mut __struct.error {
22166            let val = buf.get_u8();
22167            *v = val;
22168        }
22169        Ok(__struct)
22170    }
22171    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22172        let mut __tmp = BytesMut::new(bytes);
22173        #[allow(clippy::absurd_extreme_comparisons)]
22174        #[allow(unused_comparisons)]
22175        if __tmp.remaining() < Self::ENCODED_LEN {
22176            panic!(
22177                "buffer is too small (need {} bytes, but got {})",
22178                Self::ENCODED_LEN,
22179                __tmp.remaining(),
22180            )
22181        }
22182        __tmp.put_u8(self.status as u8);
22183        for val in &self.error {
22184            __tmp.put_u8(*val);
22185        }
22186        if matches!(version, MavlinkVersion::V2) {
22187            let len = __tmp.len();
22188            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22189        } else {
22190            __tmp.len()
22191        }
22192    }
22193}
22194#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22195#[doc = ""]
22196#[doc = "ID: 12902"]
22197#[derive(Debug, Clone, PartialEq)]
22198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22200#[cfg_attr(feature = "ts", derive(TS))]
22201#[cfg_attr(feature = "ts", ts(export))]
22202pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22203    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22204    pub timestamp: u32,
22205    #[doc = "System ID (0 for broadcast)."]
22206    pub target_system: u8,
22207    #[doc = "Component ID (0 for broadcast)."]
22208    pub target_component: u8,
22209    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22210    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22211    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22212    pub id_or_mac: [u8; 20],
22213    #[doc = "Indicates the type of authentication."]
22214    pub authentication_type: MavOdidAuthType,
22215    #[doc = "Allowed range is 0 - 15."]
22216    pub data_page: u8,
22217    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22218    pub last_page_index: u8,
22219    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22220    pub length: u8,
22221    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22222    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22223    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22224    pub authentication_data: [u8; 23],
22225}
22226impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22227    pub const ENCODED_LEN: usize = 53usize;
22228    pub const DEFAULT: Self = Self {
22229        timestamp: 0_u32,
22230        target_system: 0_u8,
22231        target_component: 0_u8,
22232        id_or_mac: [0_u8; 20usize],
22233        authentication_type: MavOdidAuthType::DEFAULT,
22234        data_page: 0_u8,
22235        last_page_index: 0_u8,
22236        length: 0_u8,
22237        authentication_data: [0_u8; 23usize],
22238    };
22239    #[cfg(feature = "arbitrary")]
22240    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22241        use arbitrary::{Arbitrary, Unstructured};
22242        let mut buf = [0u8; 1024];
22243        rng.fill_bytes(&mut buf);
22244        let mut unstructured = Unstructured::new(&buf);
22245        Self::arbitrary(&mut unstructured).unwrap_or_default()
22246    }
22247}
22248impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22249    fn default() -> Self {
22250        Self::DEFAULT.clone()
22251    }
22252}
22253impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22254    type Message = MavMessage;
22255    const ID: u32 = 12902u32;
22256    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22257    const EXTRA_CRC: u8 = 140u8;
22258    const ENCODED_LEN: usize = 53usize;
22259    fn deser(
22260        _version: MavlinkVersion,
22261        __input: &[u8],
22262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22263        let avail_len = __input.len();
22264        let mut payload_buf = [0; Self::ENCODED_LEN];
22265        let mut buf = if avail_len < Self::ENCODED_LEN {
22266            payload_buf[0..avail_len].copy_from_slice(__input);
22267            Bytes::new(&payload_buf)
22268        } else {
22269            Bytes::new(__input)
22270        };
22271        let mut __struct = Self::default();
22272        __struct.timestamp = buf.get_u32_le();
22273        __struct.target_system = buf.get_u8();
22274        __struct.target_component = buf.get_u8();
22275        for v in &mut __struct.id_or_mac {
22276            let val = buf.get_u8();
22277            *v = val;
22278        }
22279        let tmp = buf.get_u8();
22280        __struct.authentication_type =
22281            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22282                enum_type: "MavOdidAuthType",
22283                value: tmp as u32,
22284            })?;
22285        __struct.data_page = buf.get_u8();
22286        __struct.last_page_index = buf.get_u8();
22287        __struct.length = buf.get_u8();
22288        for v in &mut __struct.authentication_data {
22289            let val = buf.get_u8();
22290            *v = val;
22291        }
22292        Ok(__struct)
22293    }
22294    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22295        let mut __tmp = BytesMut::new(bytes);
22296        #[allow(clippy::absurd_extreme_comparisons)]
22297        #[allow(unused_comparisons)]
22298        if __tmp.remaining() < Self::ENCODED_LEN {
22299            panic!(
22300                "buffer is too small (need {} bytes, but got {})",
22301                Self::ENCODED_LEN,
22302                __tmp.remaining(),
22303            )
22304        }
22305        __tmp.put_u32_le(self.timestamp);
22306        __tmp.put_u8(self.target_system);
22307        __tmp.put_u8(self.target_component);
22308        for val in &self.id_or_mac {
22309            __tmp.put_u8(*val);
22310        }
22311        __tmp.put_u8(self.authentication_type as u8);
22312        __tmp.put_u8(self.data_page);
22313        __tmp.put_u8(self.last_page_index);
22314        __tmp.put_u8(self.length);
22315        for val in &self.authentication_data {
22316            __tmp.put_u8(*val);
22317        }
22318        if matches!(version, MavlinkVersion::V2) {
22319            let len = __tmp.len();
22320            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22321        } else {
22322            __tmp.len()
22323        }
22324    }
22325}
22326#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22327#[doc = ""]
22328#[doc = "ID: 12900"]
22329#[derive(Debug, Clone, PartialEq)]
22330#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22331#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22332#[cfg_attr(feature = "ts", derive(TS))]
22333#[cfg_attr(feature = "ts", ts(export))]
22334pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22335    #[doc = "System ID (0 for broadcast)."]
22336    pub target_system: u8,
22337    #[doc = "Component ID (0 for broadcast)."]
22338    pub target_component: u8,
22339    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22340    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22341    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22342    pub id_or_mac: [u8; 20],
22343    #[doc = "Indicates the format for the uas_id field of this message."]
22344    pub id_type: MavOdidIdType,
22345    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22346    pub ua_type: MavOdidUaType,
22347    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22348    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22349    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22350    pub uas_id: [u8; 20],
22351}
22352impl OPEN_DRONE_ID_BASIC_ID_DATA {
22353    pub const ENCODED_LEN: usize = 44usize;
22354    pub const DEFAULT: Self = Self {
22355        target_system: 0_u8,
22356        target_component: 0_u8,
22357        id_or_mac: [0_u8; 20usize],
22358        id_type: MavOdidIdType::DEFAULT,
22359        ua_type: MavOdidUaType::DEFAULT,
22360        uas_id: [0_u8; 20usize],
22361    };
22362    #[cfg(feature = "arbitrary")]
22363    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22364        use arbitrary::{Arbitrary, Unstructured};
22365        let mut buf = [0u8; 1024];
22366        rng.fill_bytes(&mut buf);
22367        let mut unstructured = Unstructured::new(&buf);
22368        Self::arbitrary(&mut unstructured).unwrap_or_default()
22369    }
22370}
22371impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22372    fn default() -> Self {
22373        Self::DEFAULT.clone()
22374    }
22375}
22376impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22377    type Message = MavMessage;
22378    const ID: u32 = 12900u32;
22379    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22380    const EXTRA_CRC: u8 = 114u8;
22381    const ENCODED_LEN: usize = 44usize;
22382    fn deser(
22383        _version: MavlinkVersion,
22384        __input: &[u8],
22385    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22386        let avail_len = __input.len();
22387        let mut payload_buf = [0; Self::ENCODED_LEN];
22388        let mut buf = if avail_len < Self::ENCODED_LEN {
22389            payload_buf[0..avail_len].copy_from_slice(__input);
22390            Bytes::new(&payload_buf)
22391        } else {
22392            Bytes::new(__input)
22393        };
22394        let mut __struct = Self::default();
22395        __struct.target_system = buf.get_u8();
22396        __struct.target_component = buf.get_u8();
22397        for v in &mut __struct.id_or_mac {
22398            let val = buf.get_u8();
22399            *v = val;
22400        }
22401        let tmp = buf.get_u8();
22402        __struct.id_type =
22403            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22404                enum_type: "MavOdidIdType",
22405                value: tmp as u32,
22406            })?;
22407        let tmp = buf.get_u8();
22408        __struct.ua_type =
22409            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22410                enum_type: "MavOdidUaType",
22411                value: tmp as u32,
22412            })?;
22413        for v in &mut __struct.uas_id {
22414            let val = buf.get_u8();
22415            *v = val;
22416        }
22417        Ok(__struct)
22418    }
22419    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22420        let mut __tmp = BytesMut::new(bytes);
22421        #[allow(clippy::absurd_extreme_comparisons)]
22422        #[allow(unused_comparisons)]
22423        if __tmp.remaining() < Self::ENCODED_LEN {
22424            panic!(
22425                "buffer is too small (need {} bytes, but got {})",
22426                Self::ENCODED_LEN,
22427                __tmp.remaining(),
22428            )
22429        }
22430        __tmp.put_u8(self.target_system);
22431        __tmp.put_u8(self.target_component);
22432        for val in &self.id_or_mac {
22433            __tmp.put_u8(*val);
22434        }
22435        __tmp.put_u8(self.id_type as u8);
22436        __tmp.put_u8(self.ua_type as u8);
22437        for val in &self.uas_id {
22438            __tmp.put_u8(*val);
22439        }
22440        if matches!(version, MavlinkVersion::V2) {
22441            let len = __tmp.len();
22442            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22443        } else {
22444            __tmp.len()
22445        }
22446    }
22447}
22448#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22449#[doc = ""]
22450#[doc = "ID: 12901"]
22451#[derive(Debug, Clone, PartialEq)]
22452#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22453#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22454#[cfg_attr(feature = "ts", derive(TS))]
22455#[cfg_attr(feature = "ts", ts(export))]
22456pub struct OPEN_DRONE_ID_LOCATION_DATA {
22457    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22458    pub latitude: i32,
22459    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22460    pub longitude: i32,
22461    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22462    pub altitude_barometric: f32,
22463    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22464    pub altitude_geodetic: f32,
22465    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22466    pub height: f32,
22467    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22468    pub timestamp: f32,
22469    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22470    pub direction: u16,
22471    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22472    pub speed_horizontal: u16,
22473    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22474    pub speed_vertical: i16,
22475    #[doc = "System ID (0 for broadcast)."]
22476    pub target_system: u8,
22477    #[doc = "Component ID (0 for broadcast)."]
22478    pub target_component: u8,
22479    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22480    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22481    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22482    pub id_or_mac: [u8; 20],
22483    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22484    pub status: MavOdidStatus,
22485    #[doc = "Indicates the reference point for the height field."]
22486    pub height_reference: MavOdidHeightRef,
22487    #[doc = "The accuracy of the horizontal position."]
22488    pub horizontal_accuracy: MavOdidHorAcc,
22489    #[doc = "The accuracy of the vertical position."]
22490    pub vertical_accuracy: MavOdidVerAcc,
22491    #[doc = "The accuracy of the barometric altitude."]
22492    pub barometer_accuracy: MavOdidVerAcc,
22493    #[doc = "The accuracy of the horizontal and vertical speed."]
22494    pub speed_accuracy: MavOdidSpeedAcc,
22495    #[doc = "The accuracy of the timestamps."]
22496    pub timestamp_accuracy: MavOdidTimeAcc,
22497}
22498impl OPEN_DRONE_ID_LOCATION_DATA {
22499    pub const ENCODED_LEN: usize = 59usize;
22500    pub const DEFAULT: Self = Self {
22501        latitude: 0_i32,
22502        longitude: 0_i32,
22503        altitude_barometric: 0.0_f32,
22504        altitude_geodetic: 0.0_f32,
22505        height: 0.0_f32,
22506        timestamp: 0.0_f32,
22507        direction: 0_u16,
22508        speed_horizontal: 0_u16,
22509        speed_vertical: 0_i16,
22510        target_system: 0_u8,
22511        target_component: 0_u8,
22512        id_or_mac: [0_u8; 20usize],
22513        status: MavOdidStatus::DEFAULT,
22514        height_reference: MavOdidHeightRef::DEFAULT,
22515        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22516        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22517        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22518        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22519        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22520    };
22521    #[cfg(feature = "arbitrary")]
22522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22523        use arbitrary::{Arbitrary, Unstructured};
22524        let mut buf = [0u8; 1024];
22525        rng.fill_bytes(&mut buf);
22526        let mut unstructured = Unstructured::new(&buf);
22527        Self::arbitrary(&mut unstructured).unwrap_or_default()
22528    }
22529}
22530impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22531    fn default() -> Self {
22532        Self::DEFAULT.clone()
22533    }
22534}
22535impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22536    type Message = MavMessage;
22537    const ID: u32 = 12901u32;
22538    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22539    const EXTRA_CRC: u8 = 254u8;
22540    const ENCODED_LEN: usize = 59usize;
22541    fn deser(
22542        _version: MavlinkVersion,
22543        __input: &[u8],
22544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22545        let avail_len = __input.len();
22546        let mut payload_buf = [0; Self::ENCODED_LEN];
22547        let mut buf = if avail_len < Self::ENCODED_LEN {
22548            payload_buf[0..avail_len].copy_from_slice(__input);
22549            Bytes::new(&payload_buf)
22550        } else {
22551            Bytes::new(__input)
22552        };
22553        let mut __struct = Self::default();
22554        __struct.latitude = buf.get_i32_le();
22555        __struct.longitude = buf.get_i32_le();
22556        __struct.altitude_barometric = buf.get_f32_le();
22557        __struct.altitude_geodetic = buf.get_f32_le();
22558        __struct.height = buf.get_f32_le();
22559        __struct.timestamp = buf.get_f32_le();
22560        __struct.direction = buf.get_u16_le();
22561        __struct.speed_horizontal = buf.get_u16_le();
22562        __struct.speed_vertical = buf.get_i16_le();
22563        __struct.target_system = buf.get_u8();
22564        __struct.target_component = buf.get_u8();
22565        for v in &mut __struct.id_or_mac {
22566            let val = buf.get_u8();
22567            *v = val;
22568        }
22569        let tmp = buf.get_u8();
22570        __struct.status =
22571            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22572                enum_type: "MavOdidStatus",
22573                value: tmp as u32,
22574            })?;
22575        let tmp = buf.get_u8();
22576        __struct.height_reference =
22577            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22578                enum_type: "MavOdidHeightRef",
22579                value: tmp as u32,
22580            })?;
22581        let tmp = buf.get_u8();
22582        __struct.horizontal_accuracy =
22583            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22584                enum_type: "MavOdidHorAcc",
22585                value: tmp as u32,
22586            })?;
22587        let tmp = buf.get_u8();
22588        __struct.vertical_accuracy =
22589            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22590                enum_type: "MavOdidVerAcc",
22591                value: tmp as u32,
22592            })?;
22593        let tmp = buf.get_u8();
22594        __struct.barometer_accuracy =
22595            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22596                enum_type: "MavOdidVerAcc",
22597                value: tmp as u32,
22598            })?;
22599        let tmp = buf.get_u8();
22600        __struct.speed_accuracy =
22601            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22602                enum_type: "MavOdidSpeedAcc",
22603                value: tmp as u32,
22604            })?;
22605        let tmp = buf.get_u8();
22606        __struct.timestamp_accuracy =
22607            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22608                enum_type: "MavOdidTimeAcc",
22609                value: tmp as u32,
22610            })?;
22611        Ok(__struct)
22612    }
22613    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22614        let mut __tmp = BytesMut::new(bytes);
22615        #[allow(clippy::absurd_extreme_comparisons)]
22616        #[allow(unused_comparisons)]
22617        if __tmp.remaining() < Self::ENCODED_LEN {
22618            panic!(
22619                "buffer is too small (need {} bytes, but got {})",
22620                Self::ENCODED_LEN,
22621                __tmp.remaining(),
22622            )
22623        }
22624        __tmp.put_i32_le(self.latitude);
22625        __tmp.put_i32_le(self.longitude);
22626        __tmp.put_f32_le(self.altitude_barometric);
22627        __tmp.put_f32_le(self.altitude_geodetic);
22628        __tmp.put_f32_le(self.height);
22629        __tmp.put_f32_le(self.timestamp);
22630        __tmp.put_u16_le(self.direction);
22631        __tmp.put_u16_le(self.speed_horizontal);
22632        __tmp.put_i16_le(self.speed_vertical);
22633        __tmp.put_u8(self.target_system);
22634        __tmp.put_u8(self.target_component);
22635        for val in &self.id_or_mac {
22636            __tmp.put_u8(*val);
22637        }
22638        __tmp.put_u8(self.status as u8);
22639        __tmp.put_u8(self.height_reference as u8);
22640        __tmp.put_u8(self.horizontal_accuracy as u8);
22641        __tmp.put_u8(self.vertical_accuracy as u8);
22642        __tmp.put_u8(self.barometer_accuracy as u8);
22643        __tmp.put_u8(self.speed_accuracy as u8);
22644        __tmp.put_u8(self.timestamp_accuracy as u8);
22645        if matches!(version, MavlinkVersion::V2) {
22646            let len = __tmp.len();
22647            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22648        } else {
22649            __tmp.len()
22650        }
22651    }
22652}
22653#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22654#[doc = ""]
22655#[doc = "ID: 12915"]
22656#[derive(Debug, Clone, PartialEq)]
22657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22658#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22659#[cfg_attr(feature = "ts", derive(TS))]
22660#[cfg_attr(feature = "ts", ts(export))]
22661pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22662    #[doc = "System ID (0 for broadcast)."]
22663    pub target_system: u8,
22664    #[doc = "Component ID (0 for broadcast)."]
22665    pub target_component: u8,
22666    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22667    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22668    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22669    pub id_or_mac: [u8; 20],
22670    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22671    pub single_message_size: u8,
22672    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22673    pub msg_pack_size: u8,
22674    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22675    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22676    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22677    pub messages: [u8; 225],
22678}
22679impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22680    pub const ENCODED_LEN: usize = 249usize;
22681    pub const DEFAULT: Self = Self {
22682        target_system: 0_u8,
22683        target_component: 0_u8,
22684        id_or_mac: [0_u8; 20usize],
22685        single_message_size: 0_u8,
22686        msg_pack_size: 0_u8,
22687        messages: [0_u8; 225usize],
22688    };
22689    #[cfg(feature = "arbitrary")]
22690    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22691        use arbitrary::{Arbitrary, Unstructured};
22692        let mut buf = [0u8; 1024];
22693        rng.fill_bytes(&mut buf);
22694        let mut unstructured = Unstructured::new(&buf);
22695        Self::arbitrary(&mut unstructured).unwrap_or_default()
22696    }
22697}
22698impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22699    fn default() -> Self {
22700        Self::DEFAULT.clone()
22701    }
22702}
22703impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22704    type Message = MavMessage;
22705    const ID: u32 = 12915u32;
22706    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22707    const EXTRA_CRC: u8 = 94u8;
22708    const ENCODED_LEN: usize = 249usize;
22709    fn deser(
22710        _version: MavlinkVersion,
22711        __input: &[u8],
22712    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22713        let avail_len = __input.len();
22714        let mut payload_buf = [0; Self::ENCODED_LEN];
22715        let mut buf = if avail_len < Self::ENCODED_LEN {
22716            payload_buf[0..avail_len].copy_from_slice(__input);
22717            Bytes::new(&payload_buf)
22718        } else {
22719            Bytes::new(__input)
22720        };
22721        let mut __struct = Self::default();
22722        __struct.target_system = buf.get_u8();
22723        __struct.target_component = buf.get_u8();
22724        for v in &mut __struct.id_or_mac {
22725            let val = buf.get_u8();
22726            *v = val;
22727        }
22728        __struct.single_message_size = buf.get_u8();
22729        __struct.msg_pack_size = buf.get_u8();
22730        for v in &mut __struct.messages {
22731            let val = buf.get_u8();
22732            *v = val;
22733        }
22734        Ok(__struct)
22735    }
22736    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22737        let mut __tmp = BytesMut::new(bytes);
22738        #[allow(clippy::absurd_extreme_comparisons)]
22739        #[allow(unused_comparisons)]
22740        if __tmp.remaining() < Self::ENCODED_LEN {
22741            panic!(
22742                "buffer is too small (need {} bytes, but got {})",
22743                Self::ENCODED_LEN,
22744                __tmp.remaining(),
22745            )
22746        }
22747        __tmp.put_u8(self.target_system);
22748        __tmp.put_u8(self.target_component);
22749        for val in &self.id_or_mac {
22750            __tmp.put_u8(*val);
22751        }
22752        __tmp.put_u8(self.single_message_size);
22753        __tmp.put_u8(self.msg_pack_size);
22754        for val in &self.messages {
22755            __tmp.put_u8(*val);
22756        }
22757        if matches!(version, MavlinkVersion::V2) {
22758            let len = __tmp.len();
22759            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22760        } else {
22761            __tmp.len()
22762        }
22763    }
22764}
22765#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22766#[doc = ""]
22767#[doc = "ID: 12905"]
22768#[derive(Debug, Clone, PartialEq)]
22769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22771#[cfg_attr(feature = "ts", derive(TS))]
22772#[cfg_attr(feature = "ts", ts(export))]
22773pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22774    #[doc = "System ID (0 for broadcast)."]
22775    pub target_system: u8,
22776    #[doc = "Component ID (0 for broadcast)."]
22777    pub target_component: u8,
22778    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22779    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22780    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22781    pub id_or_mac: [u8; 20],
22782    #[doc = "Indicates the type of the operator_id field."]
22783    pub operator_id_type: MavOdidOperatorIdType,
22784    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22785    #[cfg_attr(
22786        feature = "serde",
22787        serde(
22788            serialize_with = "crate::nulstr::serialize::<_, 20>",
22789            deserialize_with = "crate::nulstr::deserialize::<_, 20>"
22790        )
22791    )]
22792    #[cfg_attr(feature = "ts", ts(type = "string"))]
22793    pub operator_id: [u8; 20],
22794}
22795impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22796    pub const ENCODED_LEN: usize = 43usize;
22797    pub const DEFAULT: Self = Self {
22798        target_system: 0_u8,
22799        target_component: 0_u8,
22800        id_or_mac: [0_u8; 20usize],
22801        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22802        operator_id: [0_u8; 20usize],
22803    };
22804    #[cfg(feature = "arbitrary")]
22805    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22806        use arbitrary::{Arbitrary, Unstructured};
22807        let mut buf = [0u8; 1024];
22808        rng.fill_bytes(&mut buf);
22809        let mut unstructured = Unstructured::new(&buf);
22810        Self::arbitrary(&mut unstructured).unwrap_or_default()
22811    }
22812}
22813impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22814    fn default() -> Self {
22815        Self::DEFAULT.clone()
22816    }
22817}
22818impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22819    type Message = MavMessage;
22820    const ID: u32 = 12905u32;
22821    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22822    const EXTRA_CRC: u8 = 49u8;
22823    const ENCODED_LEN: usize = 43usize;
22824    fn deser(
22825        _version: MavlinkVersion,
22826        __input: &[u8],
22827    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22828        let avail_len = __input.len();
22829        let mut payload_buf = [0; Self::ENCODED_LEN];
22830        let mut buf = if avail_len < Self::ENCODED_LEN {
22831            payload_buf[0..avail_len].copy_from_slice(__input);
22832            Bytes::new(&payload_buf)
22833        } else {
22834            Bytes::new(__input)
22835        };
22836        let mut __struct = Self::default();
22837        __struct.target_system = buf.get_u8();
22838        __struct.target_component = buf.get_u8();
22839        for v in &mut __struct.id_or_mac {
22840            let val = buf.get_u8();
22841            *v = val;
22842        }
22843        let tmp = buf.get_u8();
22844        __struct.operator_id_type =
22845            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22846                enum_type: "MavOdidOperatorIdType",
22847                value: tmp as u32,
22848            })?;
22849        for v in &mut __struct.operator_id {
22850            let val = buf.get_u8();
22851            *v = val;
22852        }
22853        Ok(__struct)
22854    }
22855    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22856        let mut __tmp = BytesMut::new(bytes);
22857        #[allow(clippy::absurd_extreme_comparisons)]
22858        #[allow(unused_comparisons)]
22859        if __tmp.remaining() < Self::ENCODED_LEN {
22860            panic!(
22861                "buffer is too small (need {} bytes, but got {})",
22862                Self::ENCODED_LEN,
22863                __tmp.remaining(),
22864            )
22865        }
22866        __tmp.put_u8(self.target_system);
22867        __tmp.put_u8(self.target_component);
22868        for val in &self.id_or_mac {
22869            __tmp.put_u8(*val);
22870        }
22871        __tmp.put_u8(self.operator_id_type as u8);
22872        for val in &self.operator_id {
22873            __tmp.put_u8(*val);
22874        }
22875        if matches!(version, MavlinkVersion::V2) {
22876            let len = __tmp.len();
22877            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22878        } else {
22879            __tmp.len()
22880        }
22881    }
22882}
22883#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22884#[doc = ""]
22885#[doc = "ID: 12903"]
22886#[derive(Debug, Clone, PartialEq)]
22887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22888#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22889#[cfg_attr(feature = "ts", derive(TS))]
22890#[cfg_attr(feature = "ts", ts(export))]
22891pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22892    #[doc = "System ID (0 for broadcast)."]
22893    pub target_system: u8,
22894    #[doc = "Component ID (0 for broadcast)."]
22895    pub target_component: u8,
22896    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22897    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22898    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22899    pub id_or_mac: [u8; 20],
22900    #[doc = "Indicates the type of the description field."]
22901    pub description_type: MavOdidDescType,
22902    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22903    #[cfg_attr(
22904        feature = "serde",
22905        serde(
22906            serialize_with = "crate::nulstr::serialize::<_, 23>",
22907            deserialize_with = "crate::nulstr::deserialize::<_, 23>"
22908        )
22909    )]
22910    #[cfg_attr(feature = "ts", ts(type = "string"))]
22911    pub description: [u8; 23],
22912}
22913impl OPEN_DRONE_ID_SELF_ID_DATA {
22914    pub const ENCODED_LEN: usize = 46usize;
22915    pub const DEFAULT: Self = Self {
22916        target_system: 0_u8,
22917        target_component: 0_u8,
22918        id_or_mac: [0_u8; 20usize],
22919        description_type: MavOdidDescType::DEFAULT,
22920        description: [0_u8; 23usize],
22921    };
22922    #[cfg(feature = "arbitrary")]
22923    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22924        use arbitrary::{Arbitrary, Unstructured};
22925        let mut buf = [0u8; 1024];
22926        rng.fill_bytes(&mut buf);
22927        let mut unstructured = Unstructured::new(&buf);
22928        Self::arbitrary(&mut unstructured).unwrap_or_default()
22929    }
22930}
22931impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22932    fn default() -> Self {
22933        Self::DEFAULT.clone()
22934    }
22935}
22936impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22937    type Message = MavMessage;
22938    const ID: u32 = 12903u32;
22939    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22940    const EXTRA_CRC: u8 = 249u8;
22941    const ENCODED_LEN: usize = 46usize;
22942    fn deser(
22943        _version: MavlinkVersion,
22944        __input: &[u8],
22945    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22946        let avail_len = __input.len();
22947        let mut payload_buf = [0; Self::ENCODED_LEN];
22948        let mut buf = if avail_len < Self::ENCODED_LEN {
22949            payload_buf[0..avail_len].copy_from_slice(__input);
22950            Bytes::new(&payload_buf)
22951        } else {
22952            Bytes::new(__input)
22953        };
22954        let mut __struct = Self::default();
22955        __struct.target_system = buf.get_u8();
22956        __struct.target_component = buf.get_u8();
22957        for v in &mut __struct.id_or_mac {
22958            let val = buf.get_u8();
22959            *v = val;
22960        }
22961        let tmp = buf.get_u8();
22962        __struct.description_type =
22963            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22964                enum_type: "MavOdidDescType",
22965                value: tmp as u32,
22966            })?;
22967        for v in &mut __struct.description {
22968            let val = buf.get_u8();
22969            *v = val;
22970        }
22971        Ok(__struct)
22972    }
22973    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22974        let mut __tmp = BytesMut::new(bytes);
22975        #[allow(clippy::absurd_extreme_comparisons)]
22976        #[allow(unused_comparisons)]
22977        if __tmp.remaining() < Self::ENCODED_LEN {
22978            panic!(
22979                "buffer is too small (need {} bytes, but got {})",
22980                Self::ENCODED_LEN,
22981                __tmp.remaining(),
22982            )
22983        }
22984        __tmp.put_u8(self.target_system);
22985        __tmp.put_u8(self.target_component);
22986        for val in &self.id_or_mac {
22987            __tmp.put_u8(*val);
22988        }
22989        __tmp.put_u8(self.description_type as u8);
22990        for val in &self.description {
22991            __tmp.put_u8(*val);
22992        }
22993        if matches!(version, MavlinkVersion::V2) {
22994            let len = __tmp.len();
22995            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22996        } else {
22997            __tmp.len()
22998        }
22999    }
23000}
23001#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
23002#[doc = ""]
23003#[doc = "ID: 12904"]
23004#[derive(Debug, Clone, PartialEq)]
23005#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23006#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23007#[cfg_attr(feature = "ts", derive(TS))]
23008#[cfg_attr(feature = "ts", ts(export))]
23009pub struct OPEN_DRONE_ID_SYSTEM_DATA {
23010    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23011    pub operator_latitude: i32,
23012    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23013    pub operator_longitude: i32,
23014    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23015    pub area_ceiling: f32,
23016    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23017    pub area_floor: f32,
23018    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23019    pub operator_altitude_geo: f32,
23020    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23021    pub timestamp: u32,
23022    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
23023    pub area_count: u16,
23024    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
23025    pub area_radius: u16,
23026    #[doc = "System ID (0 for broadcast)."]
23027    pub target_system: u8,
23028    #[doc = "Component ID (0 for broadcast)."]
23029    pub target_component: u8,
23030    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23031    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23032    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23033    pub id_or_mac: [u8; 20],
23034    #[doc = "Specifies the operator location type."]
23035    pub operator_location_type: MavOdidOperatorLocationType,
23036    #[doc = "Specifies the classification type of the UA."]
23037    pub classification_type: MavOdidClassificationType,
23038    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
23039    pub category_eu: MavOdidCategoryEu,
23040    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
23041    pub class_eu: MavOdidClassEu,
23042}
23043impl OPEN_DRONE_ID_SYSTEM_DATA {
23044    pub const ENCODED_LEN: usize = 54usize;
23045    pub const DEFAULT: Self = Self {
23046        operator_latitude: 0_i32,
23047        operator_longitude: 0_i32,
23048        area_ceiling: 0.0_f32,
23049        area_floor: 0.0_f32,
23050        operator_altitude_geo: 0.0_f32,
23051        timestamp: 0_u32,
23052        area_count: 0_u16,
23053        area_radius: 0_u16,
23054        target_system: 0_u8,
23055        target_component: 0_u8,
23056        id_or_mac: [0_u8; 20usize],
23057        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
23058        classification_type: MavOdidClassificationType::DEFAULT,
23059        category_eu: MavOdidCategoryEu::DEFAULT,
23060        class_eu: MavOdidClassEu::DEFAULT,
23061    };
23062    #[cfg(feature = "arbitrary")]
23063    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23064        use arbitrary::{Arbitrary, Unstructured};
23065        let mut buf = [0u8; 1024];
23066        rng.fill_bytes(&mut buf);
23067        let mut unstructured = Unstructured::new(&buf);
23068        Self::arbitrary(&mut unstructured).unwrap_or_default()
23069    }
23070}
23071impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
23072    fn default() -> Self {
23073        Self::DEFAULT.clone()
23074    }
23075}
23076impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
23077    type Message = MavMessage;
23078    const ID: u32 = 12904u32;
23079    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
23080    const EXTRA_CRC: u8 = 77u8;
23081    const ENCODED_LEN: usize = 54usize;
23082    fn deser(
23083        _version: MavlinkVersion,
23084        __input: &[u8],
23085    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23086        let avail_len = __input.len();
23087        let mut payload_buf = [0; Self::ENCODED_LEN];
23088        let mut buf = if avail_len < Self::ENCODED_LEN {
23089            payload_buf[0..avail_len].copy_from_slice(__input);
23090            Bytes::new(&payload_buf)
23091        } else {
23092            Bytes::new(__input)
23093        };
23094        let mut __struct = Self::default();
23095        __struct.operator_latitude = buf.get_i32_le();
23096        __struct.operator_longitude = buf.get_i32_le();
23097        __struct.area_ceiling = buf.get_f32_le();
23098        __struct.area_floor = buf.get_f32_le();
23099        __struct.operator_altitude_geo = buf.get_f32_le();
23100        __struct.timestamp = buf.get_u32_le();
23101        __struct.area_count = buf.get_u16_le();
23102        __struct.area_radius = buf.get_u16_le();
23103        __struct.target_system = buf.get_u8();
23104        __struct.target_component = buf.get_u8();
23105        for v in &mut __struct.id_or_mac {
23106            let val = buf.get_u8();
23107            *v = val;
23108        }
23109        let tmp = buf.get_u8();
23110        __struct.operator_location_type =
23111            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23112                enum_type: "MavOdidOperatorLocationType",
23113                value: tmp as u32,
23114            })?;
23115        let tmp = buf.get_u8();
23116        __struct.classification_type =
23117            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23118                enum_type: "MavOdidClassificationType",
23119                value: tmp as u32,
23120            })?;
23121        let tmp = buf.get_u8();
23122        __struct.category_eu =
23123            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23124                enum_type: "MavOdidCategoryEu",
23125                value: tmp as u32,
23126            })?;
23127        let tmp = buf.get_u8();
23128        __struct.class_eu =
23129            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23130                enum_type: "MavOdidClassEu",
23131                value: tmp as u32,
23132            })?;
23133        Ok(__struct)
23134    }
23135    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23136        let mut __tmp = BytesMut::new(bytes);
23137        #[allow(clippy::absurd_extreme_comparisons)]
23138        #[allow(unused_comparisons)]
23139        if __tmp.remaining() < Self::ENCODED_LEN {
23140            panic!(
23141                "buffer is too small (need {} bytes, but got {})",
23142                Self::ENCODED_LEN,
23143                __tmp.remaining(),
23144            )
23145        }
23146        __tmp.put_i32_le(self.operator_latitude);
23147        __tmp.put_i32_le(self.operator_longitude);
23148        __tmp.put_f32_le(self.area_ceiling);
23149        __tmp.put_f32_le(self.area_floor);
23150        __tmp.put_f32_le(self.operator_altitude_geo);
23151        __tmp.put_u32_le(self.timestamp);
23152        __tmp.put_u16_le(self.area_count);
23153        __tmp.put_u16_le(self.area_radius);
23154        __tmp.put_u8(self.target_system);
23155        __tmp.put_u8(self.target_component);
23156        for val in &self.id_or_mac {
23157            __tmp.put_u8(*val);
23158        }
23159        __tmp.put_u8(self.operator_location_type as u8);
23160        __tmp.put_u8(self.classification_type as u8);
23161        __tmp.put_u8(self.category_eu as u8);
23162        __tmp.put_u8(self.class_eu as u8);
23163        if matches!(version, MavlinkVersion::V2) {
23164            let len = __tmp.len();
23165            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23166        } else {
23167            __tmp.len()
23168        }
23169    }
23170}
23171#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
23172#[doc = ""]
23173#[doc = "ID: 12919"]
23174#[derive(Debug, Clone, PartialEq)]
23175#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23177#[cfg_attr(feature = "ts", derive(TS))]
23178#[cfg_attr(feature = "ts", ts(export))]
23179pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23180    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23181    pub operator_latitude: i32,
23182    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23183    pub operator_longitude: i32,
23184    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23185    pub operator_altitude_geo: f32,
23186    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23187    pub timestamp: u32,
23188    #[doc = "System ID (0 for broadcast)."]
23189    pub target_system: u8,
23190    #[doc = "Component ID (0 for broadcast)."]
23191    pub target_component: u8,
23192}
23193impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23194    pub const ENCODED_LEN: usize = 18usize;
23195    pub const DEFAULT: Self = Self {
23196        operator_latitude: 0_i32,
23197        operator_longitude: 0_i32,
23198        operator_altitude_geo: 0.0_f32,
23199        timestamp: 0_u32,
23200        target_system: 0_u8,
23201        target_component: 0_u8,
23202    };
23203    #[cfg(feature = "arbitrary")]
23204    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23205        use arbitrary::{Arbitrary, Unstructured};
23206        let mut buf = [0u8; 1024];
23207        rng.fill_bytes(&mut buf);
23208        let mut unstructured = Unstructured::new(&buf);
23209        Self::arbitrary(&mut unstructured).unwrap_or_default()
23210    }
23211}
23212impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23213    fn default() -> Self {
23214        Self::DEFAULT.clone()
23215    }
23216}
23217impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23218    type Message = MavMessage;
23219    const ID: u32 = 12919u32;
23220    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23221    const EXTRA_CRC: u8 = 7u8;
23222    const ENCODED_LEN: usize = 18usize;
23223    fn deser(
23224        _version: MavlinkVersion,
23225        __input: &[u8],
23226    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23227        let avail_len = __input.len();
23228        let mut payload_buf = [0; Self::ENCODED_LEN];
23229        let mut buf = if avail_len < Self::ENCODED_LEN {
23230            payload_buf[0..avail_len].copy_from_slice(__input);
23231            Bytes::new(&payload_buf)
23232        } else {
23233            Bytes::new(__input)
23234        };
23235        let mut __struct = Self::default();
23236        __struct.operator_latitude = buf.get_i32_le();
23237        __struct.operator_longitude = buf.get_i32_le();
23238        __struct.operator_altitude_geo = buf.get_f32_le();
23239        __struct.timestamp = buf.get_u32_le();
23240        __struct.target_system = buf.get_u8();
23241        __struct.target_component = buf.get_u8();
23242        Ok(__struct)
23243    }
23244    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23245        let mut __tmp = BytesMut::new(bytes);
23246        #[allow(clippy::absurd_extreme_comparisons)]
23247        #[allow(unused_comparisons)]
23248        if __tmp.remaining() < Self::ENCODED_LEN {
23249            panic!(
23250                "buffer is too small (need {} bytes, but got {})",
23251                Self::ENCODED_LEN,
23252                __tmp.remaining(),
23253            )
23254        }
23255        __tmp.put_i32_le(self.operator_latitude);
23256        __tmp.put_i32_le(self.operator_longitude);
23257        __tmp.put_f32_le(self.operator_altitude_geo);
23258        __tmp.put_u32_le(self.timestamp);
23259        __tmp.put_u8(self.target_system);
23260        __tmp.put_u8(self.target_component);
23261        if matches!(version, MavlinkVersion::V2) {
23262            let len = __tmp.len();
23263            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23264        } else {
23265            __tmp.len()
23266        }
23267    }
23268}
23269#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23270#[doc = ""]
23271#[doc = "ID: 100"]
23272#[derive(Debug, Clone, PartialEq)]
23273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23274#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23275#[cfg_attr(feature = "ts", derive(TS))]
23276#[cfg_attr(feature = "ts", ts(export))]
23277pub struct OPTICAL_FLOW_DATA {
23278    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23279    pub time_usec: u64,
23280    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23281    pub flow_comp_m_x: f32,
23282    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23283    pub flow_comp_m_y: f32,
23284    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23285    pub ground_distance: f32,
23286    #[doc = "Flow in x-sensor direction"]
23287    pub flow_x: i16,
23288    #[doc = "Flow in y-sensor direction"]
23289    pub flow_y: i16,
23290    #[doc = "Sensor ID"]
23291    pub sensor_id: u8,
23292    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23293    pub quality: u8,
23294    #[doc = "Flow rate about X axis"]
23295    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23296    pub flow_rate_x: f32,
23297    #[doc = "Flow rate about Y axis"]
23298    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23299    pub flow_rate_y: f32,
23300}
23301impl OPTICAL_FLOW_DATA {
23302    pub const ENCODED_LEN: usize = 34usize;
23303    pub const DEFAULT: Self = Self {
23304        time_usec: 0_u64,
23305        flow_comp_m_x: 0.0_f32,
23306        flow_comp_m_y: 0.0_f32,
23307        ground_distance: 0.0_f32,
23308        flow_x: 0_i16,
23309        flow_y: 0_i16,
23310        sensor_id: 0_u8,
23311        quality: 0_u8,
23312        flow_rate_x: 0.0_f32,
23313        flow_rate_y: 0.0_f32,
23314    };
23315    #[cfg(feature = "arbitrary")]
23316    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23317        use arbitrary::{Arbitrary, Unstructured};
23318        let mut buf = [0u8; 1024];
23319        rng.fill_bytes(&mut buf);
23320        let mut unstructured = Unstructured::new(&buf);
23321        Self::arbitrary(&mut unstructured).unwrap_or_default()
23322    }
23323}
23324impl Default for OPTICAL_FLOW_DATA {
23325    fn default() -> Self {
23326        Self::DEFAULT.clone()
23327    }
23328}
23329impl MessageData for OPTICAL_FLOW_DATA {
23330    type Message = MavMessage;
23331    const ID: u32 = 100u32;
23332    const NAME: &'static str = "OPTICAL_FLOW";
23333    const EXTRA_CRC: u8 = 175u8;
23334    const ENCODED_LEN: usize = 34usize;
23335    fn deser(
23336        _version: MavlinkVersion,
23337        __input: &[u8],
23338    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23339        let avail_len = __input.len();
23340        let mut payload_buf = [0; Self::ENCODED_LEN];
23341        let mut buf = if avail_len < Self::ENCODED_LEN {
23342            payload_buf[0..avail_len].copy_from_slice(__input);
23343            Bytes::new(&payload_buf)
23344        } else {
23345            Bytes::new(__input)
23346        };
23347        let mut __struct = Self::default();
23348        __struct.time_usec = buf.get_u64_le();
23349        __struct.flow_comp_m_x = buf.get_f32_le();
23350        __struct.flow_comp_m_y = buf.get_f32_le();
23351        __struct.ground_distance = buf.get_f32_le();
23352        __struct.flow_x = buf.get_i16_le();
23353        __struct.flow_y = buf.get_i16_le();
23354        __struct.sensor_id = buf.get_u8();
23355        __struct.quality = buf.get_u8();
23356        __struct.flow_rate_x = buf.get_f32_le();
23357        __struct.flow_rate_y = buf.get_f32_le();
23358        Ok(__struct)
23359    }
23360    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23361        let mut __tmp = BytesMut::new(bytes);
23362        #[allow(clippy::absurd_extreme_comparisons)]
23363        #[allow(unused_comparisons)]
23364        if __tmp.remaining() < Self::ENCODED_LEN {
23365            panic!(
23366                "buffer is too small (need {} bytes, but got {})",
23367                Self::ENCODED_LEN,
23368                __tmp.remaining(),
23369            )
23370        }
23371        __tmp.put_u64_le(self.time_usec);
23372        __tmp.put_f32_le(self.flow_comp_m_x);
23373        __tmp.put_f32_le(self.flow_comp_m_y);
23374        __tmp.put_f32_le(self.ground_distance);
23375        __tmp.put_i16_le(self.flow_x);
23376        __tmp.put_i16_le(self.flow_y);
23377        __tmp.put_u8(self.sensor_id);
23378        __tmp.put_u8(self.quality);
23379        if matches!(version, MavlinkVersion::V2) {
23380            __tmp.put_f32_le(self.flow_rate_x);
23381            __tmp.put_f32_le(self.flow_rate_y);
23382            let len = __tmp.len();
23383            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23384        } else {
23385            __tmp.len()
23386        }
23387    }
23388}
23389#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23390#[doc = ""]
23391#[doc = "ID: 106"]
23392#[derive(Debug, Clone, PartialEq)]
23393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23395#[cfg_attr(feature = "ts", derive(TS))]
23396#[cfg_attr(feature = "ts", ts(export))]
23397pub struct OPTICAL_FLOW_RAD_DATA {
23398    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23399    pub time_usec: u64,
23400    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23401    pub integration_time_us: u32,
23402    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23403    pub integrated_x: f32,
23404    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23405    pub integrated_y: f32,
23406    #[doc = "RH rotation around X axis"]
23407    pub integrated_xgyro: f32,
23408    #[doc = "RH rotation around Y axis"]
23409    pub integrated_ygyro: f32,
23410    #[doc = "RH rotation around Z axis"]
23411    pub integrated_zgyro: f32,
23412    #[doc = "Time since the distance was sampled."]
23413    pub time_delta_distance_us: u32,
23414    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
23415    pub distance: f32,
23416    #[doc = "Temperature"]
23417    pub temperature: i16,
23418    #[doc = "Sensor ID"]
23419    pub sensor_id: u8,
23420    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
23421    pub quality: u8,
23422}
23423impl OPTICAL_FLOW_RAD_DATA {
23424    pub const ENCODED_LEN: usize = 44usize;
23425    pub const DEFAULT: Self = Self {
23426        time_usec: 0_u64,
23427        integration_time_us: 0_u32,
23428        integrated_x: 0.0_f32,
23429        integrated_y: 0.0_f32,
23430        integrated_xgyro: 0.0_f32,
23431        integrated_ygyro: 0.0_f32,
23432        integrated_zgyro: 0.0_f32,
23433        time_delta_distance_us: 0_u32,
23434        distance: 0.0_f32,
23435        temperature: 0_i16,
23436        sensor_id: 0_u8,
23437        quality: 0_u8,
23438    };
23439    #[cfg(feature = "arbitrary")]
23440    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23441        use arbitrary::{Arbitrary, Unstructured};
23442        let mut buf = [0u8; 1024];
23443        rng.fill_bytes(&mut buf);
23444        let mut unstructured = Unstructured::new(&buf);
23445        Self::arbitrary(&mut unstructured).unwrap_or_default()
23446    }
23447}
23448impl Default for OPTICAL_FLOW_RAD_DATA {
23449    fn default() -> Self {
23450        Self::DEFAULT.clone()
23451    }
23452}
23453impl MessageData for OPTICAL_FLOW_RAD_DATA {
23454    type Message = MavMessage;
23455    const ID: u32 = 106u32;
23456    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23457    const EXTRA_CRC: u8 = 138u8;
23458    const ENCODED_LEN: usize = 44usize;
23459    fn deser(
23460        _version: MavlinkVersion,
23461        __input: &[u8],
23462    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23463        let avail_len = __input.len();
23464        let mut payload_buf = [0; Self::ENCODED_LEN];
23465        let mut buf = if avail_len < Self::ENCODED_LEN {
23466            payload_buf[0..avail_len].copy_from_slice(__input);
23467            Bytes::new(&payload_buf)
23468        } else {
23469            Bytes::new(__input)
23470        };
23471        let mut __struct = Self::default();
23472        __struct.time_usec = buf.get_u64_le();
23473        __struct.integration_time_us = buf.get_u32_le();
23474        __struct.integrated_x = buf.get_f32_le();
23475        __struct.integrated_y = buf.get_f32_le();
23476        __struct.integrated_xgyro = buf.get_f32_le();
23477        __struct.integrated_ygyro = buf.get_f32_le();
23478        __struct.integrated_zgyro = buf.get_f32_le();
23479        __struct.time_delta_distance_us = buf.get_u32_le();
23480        __struct.distance = buf.get_f32_le();
23481        __struct.temperature = buf.get_i16_le();
23482        __struct.sensor_id = buf.get_u8();
23483        __struct.quality = buf.get_u8();
23484        Ok(__struct)
23485    }
23486    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23487        let mut __tmp = BytesMut::new(bytes);
23488        #[allow(clippy::absurd_extreme_comparisons)]
23489        #[allow(unused_comparisons)]
23490        if __tmp.remaining() < Self::ENCODED_LEN {
23491            panic!(
23492                "buffer is too small (need {} bytes, but got {})",
23493                Self::ENCODED_LEN,
23494                __tmp.remaining(),
23495            )
23496        }
23497        __tmp.put_u64_le(self.time_usec);
23498        __tmp.put_u32_le(self.integration_time_us);
23499        __tmp.put_f32_le(self.integrated_x);
23500        __tmp.put_f32_le(self.integrated_y);
23501        __tmp.put_f32_le(self.integrated_xgyro);
23502        __tmp.put_f32_le(self.integrated_ygyro);
23503        __tmp.put_f32_le(self.integrated_zgyro);
23504        __tmp.put_u32_le(self.time_delta_distance_us);
23505        __tmp.put_f32_le(self.distance);
23506        __tmp.put_i16_le(self.temperature);
23507        __tmp.put_u8(self.sensor_id);
23508        __tmp.put_u8(self.quality);
23509        if matches!(version, MavlinkVersion::V2) {
23510            let len = __tmp.len();
23511            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23512        } else {
23513            __tmp.len()
23514        }
23515    }
23516}
23517#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23518#[doc = ""]
23519#[doc = "ID: 360"]
23520#[derive(Debug, Clone, PartialEq)]
23521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23522#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23523#[cfg_attr(feature = "ts", derive(TS))]
23524#[cfg_attr(feature = "ts", ts(export))]
23525pub struct ORBIT_EXECUTION_STATUS_DATA {
23526    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23527    pub time_usec: u64,
23528    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23529    pub radius: f32,
23530    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23531    pub x: i32,
23532    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23533    pub y: i32,
23534    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23535    pub z: f32,
23536    #[doc = "The coordinate system of the fields: x, y, z."]
23537    pub frame: MavFrame,
23538}
23539impl ORBIT_EXECUTION_STATUS_DATA {
23540    pub const ENCODED_LEN: usize = 25usize;
23541    pub const DEFAULT: Self = Self {
23542        time_usec: 0_u64,
23543        radius: 0.0_f32,
23544        x: 0_i32,
23545        y: 0_i32,
23546        z: 0.0_f32,
23547        frame: MavFrame::DEFAULT,
23548    };
23549    #[cfg(feature = "arbitrary")]
23550    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23551        use arbitrary::{Arbitrary, Unstructured};
23552        let mut buf = [0u8; 1024];
23553        rng.fill_bytes(&mut buf);
23554        let mut unstructured = Unstructured::new(&buf);
23555        Self::arbitrary(&mut unstructured).unwrap_or_default()
23556    }
23557}
23558impl Default for ORBIT_EXECUTION_STATUS_DATA {
23559    fn default() -> Self {
23560        Self::DEFAULT.clone()
23561    }
23562}
23563impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23564    type Message = MavMessage;
23565    const ID: u32 = 360u32;
23566    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23567    const EXTRA_CRC: u8 = 11u8;
23568    const ENCODED_LEN: usize = 25usize;
23569    fn deser(
23570        _version: MavlinkVersion,
23571        __input: &[u8],
23572    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23573        let avail_len = __input.len();
23574        let mut payload_buf = [0; Self::ENCODED_LEN];
23575        let mut buf = if avail_len < Self::ENCODED_LEN {
23576            payload_buf[0..avail_len].copy_from_slice(__input);
23577            Bytes::new(&payload_buf)
23578        } else {
23579            Bytes::new(__input)
23580        };
23581        let mut __struct = Self::default();
23582        __struct.time_usec = buf.get_u64_le();
23583        __struct.radius = buf.get_f32_le();
23584        __struct.x = buf.get_i32_le();
23585        __struct.y = buf.get_i32_le();
23586        __struct.z = buf.get_f32_le();
23587        let tmp = buf.get_u8();
23588        __struct.frame =
23589            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23590                enum_type: "MavFrame",
23591                value: tmp as u32,
23592            })?;
23593        Ok(__struct)
23594    }
23595    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23596        let mut __tmp = BytesMut::new(bytes);
23597        #[allow(clippy::absurd_extreme_comparisons)]
23598        #[allow(unused_comparisons)]
23599        if __tmp.remaining() < Self::ENCODED_LEN {
23600            panic!(
23601                "buffer is too small (need {} bytes, but got {})",
23602                Self::ENCODED_LEN,
23603                __tmp.remaining(),
23604            )
23605        }
23606        __tmp.put_u64_le(self.time_usec);
23607        __tmp.put_f32_le(self.radius);
23608        __tmp.put_i32_le(self.x);
23609        __tmp.put_i32_le(self.y);
23610        __tmp.put_f32_le(self.z);
23611        __tmp.put_u8(self.frame as u8);
23612        if matches!(version, MavlinkVersion::V2) {
23613            let len = __tmp.len();
23614            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23615        } else {
23616            __tmp.len()
23617        }
23618    }
23619}
23620#[doc = "Response from a PARAM_EXT_SET message."]
23621#[doc = ""]
23622#[doc = "ID: 324"]
23623#[derive(Debug, Clone, PartialEq)]
23624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23625#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23626#[cfg_attr(feature = "ts", derive(TS))]
23627#[cfg_attr(feature = "ts", ts(export))]
23628pub struct PARAM_EXT_ACK_DATA {
23629    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23630    #[cfg_attr(
23631        feature = "serde",
23632        serde(
23633            serialize_with = "crate::nulstr::serialize::<_, 16>",
23634            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
23635        )
23636    )]
23637    #[cfg_attr(feature = "ts", ts(type = "string"))]
23638    pub param_id: [u8; 16],
23639    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23640    #[cfg_attr(
23641        feature = "serde",
23642        serde(
23643            serialize_with = "crate::nulstr::serialize::<_, 128>",
23644            deserialize_with = "crate::nulstr::deserialize::<_, 128>"
23645        )
23646    )]
23647    #[cfg_attr(feature = "ts", ts(type = "string"))]
23648    pub param_value: [u8; 128],
23649    #[doc = "Parameter type."]
23650    pub param_type: MavParamExtType,
23651    #[doc = "Result code."]
23652    pub param_result: ParamAck,
23653}
23654impl PARAM_EXT_ACK_DATA {
23655    pub const ENCODED_LEN: usize = 146usize;
23656    pub const DEFAULT: Self = Self {
23657        param_id: [0_u8; 16usize],
23658        param_value: [0_u8; 128usize],
23659        param_type: MavParamExtType::DEFAULT,
23660        param_result: ParamAck::DEFAULT,
23661    };
23662    #[cfg(feature = "arbitrary")]
23663    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23664        use arbitrary::{Arbitrary, Unstructured};
23665        let mut buf = [0u8; 1024];
23666        rng.fill_bytes(&mut buf);
23667        let mut unstructured = Unstructured::new(&buf);
23668        Self::arbitrary(&mut unstructured).unwrap_or_default()
23669    }
23670}
23671impl Default for PARAM_EXT_ACK_DATA {
23672    fn default() -> Self {
23673        Self::DEFAULT.clone()
23674    }
23675}
23676impl MessageData for PARAM_EXT_ACK_DATA {
23677    type Message = MavMessage;
23678    const ID: u32 = 324u32;
23679    const NAME: &'static str = "PARAM_EXT_ACK";
23680    const EXTRA_CRC: u8 = 132u8;
23681    const ENCODED_LEN: usize = 146usize;
23682    fn deser(
23683        _version: MavlinkVersion,
23684        __input: &[u8],
23685    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23686        let avail_len = __input.len();
23687        let mut payload_buf = [0; Self::ENCODED_LEN];
23688        let mut buf = if avail_len < Self::ENCODED_LEN {
23689            payload_buf[0..avail_len].copy_from_slice(__input);
23690            Bytes::new(&payload_buf)
23691        } else {
23692            Bytes::new(__input)
23693        };
23694        let mut __struct = Self::default();
23695        for v in &mut __struct.param_id {
23696            let val = buf.get_u8();
23697            *v = val;
23698        }
23699        for v in &mut __struct.param_value {
23700            let val = buf.get_u8();
23701            *v = val;
23702        }
23703        let tmp = buf.get_u8();
23704        __struct.param_type =
23705            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23706                enum_type: "MavParamExtType",
23707                value: tmp as u32,
23708            })?;
23709        let tmp = buf.get_u8();
23710        __struct.param_result =
23711            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23712                enum_type: "ParamAck",
23713                value: tmp as u32,
23714            })?;
23715        Ok(__struct)
23716    }
23717    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23718        let mut __tmp = BytesMut::new(bytes);
23719        #[allow(clippy::absurd_extreme_comparisons)]
23720        #[allow(unused_comparisons)]
23721        if __tmp.remaining() < Self::ENCODED_LEN {
23722            panic!(
23723                "buffer is too small (need {} bytes, but got {})",
23724                Self::ENCODED_LEN,
23725                __tmp.remaining(),
23726            )
23727        }
23728        for val in &self.param_id {
23729            __tmp.put_u8(*val);
23730        }
23731        for val in &self.param_value {
23732            __tmp.put_u8(*val);
23733        }
23734        __tmp.put_u8(self.param_type as u8);
23735        __tmp.put_u8(self.param_result as u8);
23736        if matches!(version, MavlinkVersion::V2) {
23737            let len = __tmp.len();
23738            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23739        } else {
23740            __tmp.len()
23741        }
23742    }
23743}
23744#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23745#[doc = ""]
23746#[doc = "ID: 321"]
23747#[derive(Debug, Clone, PartialEq)]
23748#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23750#[cfg_attr(feature = "ts", derive(TS))]
23751#[cfg_attr(feature = "ts", ts(export))]
23752pub struct PARAM_EXT_REQUEST_LIST_DATA {
23753    #[doc = "System ID"]
23754    pub target_system: u8,
23755    #[doc = "Component ID"]
23756    pub target_component: u8,
23757}
23758impl PARAM_EXT_REQUEST_LIST_DATA {
23759    pub const ENCODED_LEN: usize = 2usize;
23760    pub const DEFAULT: Self = Self {
23761        target_system: 0_u8,
23762        target_component: 0_u8,
23763    };
23764    #[cfg(feature = "arbitrary")]
23765    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23766        use arbitrary::{Arbitrary, Unstructured};
23767        let mut buf = [0u8; 1024];
23768        rng.fill_bytes(&mut buf);
23769        let mut unstructured = Unstructured::new(&buf);
23770        Self::arbitrary(&mut unstructured).unwrap_or_default()
23771    }
23772}
23773impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23774    fn default() -> Self {
23775        Self::DEFAULT.clone()
23776    }
23777}
23778impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23779    type Message = MavMessage;
23780    const ID: u32 = 321u32;
23781    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23782    const EXTRA_CRC: u8 = 88u8;
23783    const ENCODED_LEN: usize = 2usize;
23784    fn deser(
23785        _version: MavlinkVersion,
23786        __input: &[u8],
23787    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23788        let avail_len = __input.len();
23789        let mut payload_buf = [0; Self::ENCODED_LEN];
23790        let mut buf = if avail_len < Self::ENCODED_LEN {
23791            payload_buf[0..avail_len].copy_from_slice(__input);
23792            Bytes::new(&payload_buf)
23793        } else {
23794            Bytes::new(__input)
23795        };
23796        let mut __struct = Self::default();
23797        __struct.target_system = buf.get_u8();
23798        __struct.target_component = buf.get_u8();
23799        Ok(__struct)
23800    }
23801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23802        let mut __tmp = BytesMut::new(bytes);
23803        #[allow(clippy::absurd_extreme_comparisons)]
23804        #[allow(unused_comparisons)]
23805        if __tmp.remaining() < Self::ENCODED_LEN {
23806            panic!(
23807                "buffer is too small (need {} bytes, but got {})",
23808                Self::ENCODED_LEN,
23809                __tmp.remaining(),
23810            )
23811        }
23812        __tmp.put_u8(self.target_system);
23813        __tmp.put_u8(self.target_component);
23814        if matches!(version, MavlinkVersion::V2) {
23815            let len = __tmp.len();
23816            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23817        } else {
23818            __tmp.len()
23819        }
23820    }
23821}
23822#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23823#[doc = ""]
23824#[doc = "ID: 320"]
23825#[derive(Debug, Clone, PartialEq)]
23826#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23827#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23828#[cfg_attr(feature = "ts", derive(TS))]
23829#[cfg_attr(feature = "ts", ts(export))]
23830pub struct PARAM_EXT_REQUEST_READ_DATA {
23831    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23832    pub param_index: i16,
23833    #[doc = "System ID"]
23834    pub target_system: u8,
23835    #[doc = "Component ID"]
23836    pub target_component: u8,
23837    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23838    #[cfg_attr(
23839        feature = "serde",
23840        serde(
23841            serialize_with = "crate::nulstr::serialize::<_, 16>",
23842            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
23843        )
23844    )]
23845    #[cfg_attr(feature = "ts", ts(type = "string"))]
23846    pub param_id: [u8; 16],
23847}
23848impl PARAM_EXT_REQUEST_READ_DATA {
23849    pub const ENCODED_LEN: usize = 20usize;
23850    pub const DEFAULT: Self = Self {
23851        param_index: 0_i16,
23852        target_system: 0_u8,
23853        target_component: 0_u8,
23854        param_id: [0_u8; 16usize],
23855    };
23856    #[cfg(feature = "arbitrary")]
23857    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23858        use arbitrary::{Arbitrary, Unstructured};
23859        let mut buf = [0u8; 1024];
23860        rng.fill_bytes(&mut buf);
23861        let mut unstructured = Unstructured::new(&buf);
23862        Self::arbitrary(&mut unstructured).unwrap_or_default()
23863    }
23864}
23865impl Default for PARAM_EXT_REQUEST_READ_DATA {
23866    fn default() -> Self {
23867        Self::DEFAULT.clone()
23868    }
23869}
23870impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23871    type Message = MavMessage;
23872    const ID: u32 = 320u32;
23873    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23874    const EXTRA_CRC: u8 = 243u8;
23875    const ENCODED_LEN: usize = 20usize;
23876    fn deser(
23877        _version: MavlinkVersion,
23878        __input: &[u8],
23879    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23880        let avail_len = __input.len();
23881        let mut payload_buf = [0; Self::ENCODED_LEN];
23882        let mut buf = if avail_len < Self::ENCODED_LEN {
23883            payload_buf[0..avail_len].copy_from_slice(__input);
23884            Bytes::new(&payload_buf)
23885        } else {
23886            Bytes::new(__input)
23887        };
23888        let mut __struct = Self::default();
23889        __struct.param_index = buf.get_i16_le();
23890        __struct.target_system = buf.get_u8();
23891        __struct.target_component = buf.get_u8();
23892        for v in &mut __struct.param_id {
23893            let val = buf.get_u8();
23894            *v = val;
23895        }
23896        Ok(__struct)
23897    }
23898    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23899        let mut __tmp = BytesMut::new(bytes);
23900        #[allow(clippy::absurd_extreme_comparisons)]
23901        #[allow(unused_comparisons)]
23902        if __tmp.remaining() < Self::ENCODED_LEN {
23903            panic!(
23904                "buffer is too small (need {} bytes, but got {})",
23905                Self::ENCODED_LEN,
23906                __tmp.remaining(),
23907            )
23908        }
23909        __tmp.put_i16_le(self.param_index);
23910        __tmp.put_u8(self.target_system);
23911        __tmp.put_u8(self.target_component);
23912        for val in &self.param_id {
23913            __tmp.put_u8(*val);
23914        }
23915        if matches!(version, MavlinkVersion::V2) {
23916            let len = __tmp.len();
23917            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23918        } else {
23919            __tmp.len()
23920        }
23921    }
23922}
23923#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23924#[doc = ""]
23925#[doc = "ID: 323"]
23926#[derive(Debug, Clone, PartialEq)]
23927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23929#[cfg_attr(feature = "ts", derive(TS))]
23930#[cfg_attr(feature = "ts", ts(export))]
23931pub struct PARAM_EXT_SET_DATA {
23932    #[doc = "System ID"]
23933    pub target_system: u8,
23934    #[doc = "Component ID"]
23935    pub target_component: u8,
23936    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23937    #[cfg_attr(
23938        feature = "serde",
23939        serde(
23940            serialize_with = "crate::nulstr::serialize::<_, 16>",
23941            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
23942        )
23943    )]
23944    #[cfg_attr(feature = "ts", ts(type = "string"))]
23945    pub param_id: [u8; 16],
23946    #[doc = "Parameter value"]
23947    #[cfg_attr(
23948        feature = "serde",
23949        serde(
23950            serialize_with = "crate::nulstr::serialize::<_, 128>",
23951            deserialize_with = "crate::nulstr::deserialize::<_, 128>"
23952        )
23953    )]
23954    #[cfg_attr(feature = "ts", ts(type = "string"))]
23955    pub param_value: [u8; 128],
23956    #[doc = "Parameter type."]
23957    pub param_type: MavParamExtType,
23958}
23959impl PARAM_EXT_SET_DATA {
23960    pub const ENCODED_LEN: usize = 147usize;
23961    pub const DEFAULT: Self = Self {
23962        target_system: 0_u8,
23963        target_component: 0_u8,
23964        param_id: [0_u8; 16usize],
23965        param_value: [0_u8; 128usize],
23966        param_type: MavParamExtType::DEFAULT,
23967    };
23968    #[cfg(feature = "arbitrary")]
23969    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23970        use arbitrary::{Arbitrary, Unstructured};
23971        let mut buf = [0u8; 1024];
23972        rng.fill_bytes(&mut buf);
23973        let mut unstructured = Unstructured::new(&buf);
23974        Self::arbitrary(&mut unstructured).unwrap_or_default()
23975    }
23976}
23977impl Default for PARAM_EXT_SET_DATA {
23978    fn default() -> Self {
23979        Self::DEFAULT.clone()
23980    }
23981}
23982impl MessageData for PARAM_EXT_SET_DATA {
23983    type Message = MavMessage;
23984    const ID: u32 = 323u32;
23985    const NAME: &'static str = "PARAM_EXT_SET";
23986    const EXTRA_CRC: u8 = 78u8;
23987    const ENCODED_LEN: usize = 147usize;
23988    fn deser(
23989        _version: MavlinkVersion,
23990        __input: &[u8],
23991    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23992        let avail_len = __input.len();
23993        let mut payload_buf = [0; Self::ENCODED_LEN];
23994        let mut buf = if avail_len < Self::ENCODED_LEN {
23995            payload_buf[0..avail_len].copy_from_slice(__input);
23996            Bytes::new(&payload_buf)
23997        } else {
23998            Bytes::new(__input)
23999        };
24000        let mut __struct = Self::default();
24001        __struct.target_system = buf.get_u8();
24002        __struct.target_component = buf.get_u8();
24003        for v in &mut __struct.param_id {
24004            let val = buf.get_u8();
24005            *v = val;
24006        }
24007        for v in &mut __struct.param_value {
24008            let val = buf.get_u8();
24009            *v = val;
24010        }
24011        let tmp = buf.get_u8();
24012        __struct.param_type =
24013            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24014                enum_type: "MavParamExtType",
24015                value: tmp as u32,
24016            })?;
24017        Ok(__struct)
24018    }
24019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24020        let mut __tmp = BytesMut::new(bytes);
24021        #[allow(clippy::absurd_extreme_comparisons)]
24022        #[allow(unused_comparisons)]
24023        if __tmp.remaining() < Self::ENCODED_LEN {
24024            panic!(
24025                "buffer is too small (need {} bytes, but got {})",
24026                Self::ENCODED_LEN,
24027                __tmp.remaining(),
24028            )
24029        }
24030        __tmp.put_u8(self.target_system);
24031        __tmp.put_u8(self.target_component);
24032        for val in &self.param_id {
24033            __tmp.put_u8(*val);
24034        }
24035        for val in &self.param_value {
24036            __tmp.put_u8(*val);
24037        }
24038        __tmp.put_u8(self.param_type as u8);
24039        if matches!(version, MavlinkVersion::V2) {
24040            let len = __tmp.len();
24041            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24042        } else {
24043            __tmp.len()
24044        }
24045    }
24046}
24047#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
24048#[doc = ""]
24049#[doc = "ID: 322"]
24050#[derive(Debug, Clone, PartialEq)]
24051#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24052#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24053#[cfg_attr(feature = "ts", derive(TS))]
24054#[cfg_attr(feature = "ts", ts(export))]
24055pub struct PARAM_EXT_VALUE_DATA {
24056    #[doc = "Total number of parameters"]
24057    pub param_count: u16,
24058    #[doc = "Index of this parameter"]
24059    pub param_index: u16,
24060    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24061    #[cfg_attr(
24062        feature = "serde",
24063        serde(
24064            serialize_with = "crate::nulstr::serialize::<_, 16>",
24065            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
24066        )
24067    )]
24068    #[cfg_attr(feature = "ts", ts(type = "string"))]
24069    pub param_id: [u8; 16],
24070    #[doc = "Parameter value"]
24071    #[cfg_attr(
24072        feature = "serde",
24073        serde(
24074            serialize_with = "crate::nulstr::serialize::<_, 128>",
24075            deserialize_with = "crate::nulstr::deserialize::<_, 128>"
24076        )
24077    )]
24078    #[cfg_attr(feature = "ts", ts(type = "string"))]
24079    pub param_value: [u8; 128],
24080    #[doc = "Parameter type."]
24081    pub param_type: MavParamExtType,
24082}
24083impl PARAM_EXT_VALUE_DATA {
24084    pub const ENCODED_LEN: usize = 149usize;
24085    pub const DEFAULT: Self = Self {
24086        param_count: 0_u16,
24087        param_index: 0_u16,
24088        param_id: [0_u8; 16usize],
24089        param_value: [0_u8; 128usize],
24090        param_type: MavParamExtType::DEFAULT,
24091    };
24092    #[cfg(feature = "arbitrary")]
24093    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24094        use arbitrary::{Arbitrary, Unstructured};
24095        let mut buf = [0u8; 1024];
24096        rng.fill_bytes(&mut buf);
24097        let mut unstructured = Unstructured::new(&buf);
24098        Self::arbitrary(&mut unstructured).unwrap_or_default()
24099    }
24100}
24101impl Default for PARAM_EXT_VALUE_DATA {
24102    fn default() -> Self {
24103        Self::DEFAULT.clone()
24104    }
24105}
24106impl MessageData for PARAM_EXT_VALUE_DATA {
24107    type Message = MavMessage;
24108    const ID: u32 = 322u32;
24109    const NAME: &'static str = "PARAM_EXT_VALUE";
24110    const EXTRA_CRC: u8 = 243u8;
24111    const ENCODED_LEN: usize = 149usize;
24112    fn deser(
24113        _version: MavlinkVersion,
24114        __input: &[u8],
24115    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24116        let avail_len = __input.len();
24117        let mut payload_buf = [0; Self::ENCODED_LEN];
24118        let mut buf = if avail_len < Self::ENCODED_LEN {
24119            payload_buf[0..avail_len].copy_from_slice(__input);
24120            Bytes::new(&payload_buf)
24121        } else {
24122            Bytes::new(__input)
24123        };
24124        let mut __struct = Self::default();
24125        __struct.param_count = buf.get_u16_le();
24126        __struct.param_index = buf.get_u16_le();
24127        for v in &mut __struct.param_id {
24128            let val = buf.get_u8();
24129            *v = val;
24130        }
24131        for v in &mut __struct.param_value {
24132            let val = buf.get_u8();
24133            *v = val;
24134        }
24135        let tmp = buf.get_u8();
24136        __struct.param_type =
24137            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24138                enum_type: "MavParamExtType",
24139                value: tmp as u32,
24140            })?;
24141        Ok(__struct)
24142    }
24143    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24144        let mut __tmp = BytesMut::new(bytes);
24145        #[allow(clippy::absurd_extreme_comparisons)]
24146        #[allow(unused_comparisons)]
24147        if __tmp.remaining() < Self::ENCODED_LEN {
24148            panic!(
24149                "buffer is too small (need {} bytes, but got {})",
24150                Self::ENCODED_LEN,
24151                __tmp.remaining(),
24152            )
24153        }
24154        __tmp.put_u16_le(self.param_count);
24155        __tmp.put_u16_le(self.param_index);
24156        for val in &self.param_id {
24157            __tmp.put_u8(*val);
24158        }
24159        for val in &self.param_value {
24160            __tmp.put_u8(*val);
24161        }
24162        __tmp.put_u8(self.param_type as u8);
24163        if matches!(version, MavlinkVersion::V2) {
24164            let len = __tmp.len();
24165            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24166        } else {
24167            __tmp.len()
24168        }
24169    }
24170}
24171#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
24172#[doc = ""]
24173#[doc = "ID: 50"]
24174#[derive(Debug, Clone, PartialEq)]
24175#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24177#[cfg_attr(feature = "ts", derive(TS))]
24178#[cfg_attr(feature = "ts", ts(export))]
24179pub struct PARAM_MAP_RC_DATA {
24180    #[doc = "Initial parameter value"]
24181    pub param_value0: f32,
24182    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
24183    pub scale: f32,
24184    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
24185    pub param_value_min: f32,
24186    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
24187    pub param_value_max: f32,
24188    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
24189    pub param_index: i16,
24190    #[doc = "System ID"]
24191    pub target_system: u8,
24192    #[doc = "Component ID"]
24193    pub target_component: u8,
24194    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24195    #[cfg_attr(
24196        feature = "serde",
24197        serde(
24198            serialize_with = "crate::nulstr::serialize::<_, 16>",
24199            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
24200        )
24201    )]
24202    #[cfg_attr(feature = "ts", ts(type = "string"))]
24203    pub param_id: [u8; 16],
24204    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
24205    pub parameter_rc_channel_index: u8,
24206}
24207impl PARAM_MAP_RC_DATA {
24208    pub const ENCODED_LEN: usize = 37usize;
24209    pub const DEFAULT: Self = Self {
24210        param_value0: 0.0_f32,
24211        scale: 0.0_f32,
24212        param_value_min: 0.0_f32,
24213        param_value_max: 0.0_f32,
24214        param_index: 0_i16,
24215        target_system: 0_u8,
24216        target_component: 0_u8,
24217        param_id: [0_u8; 16usize],
24218        parameter_rc_channel_index: 0_u8,
24219    };
24220    #[cfg(feature = "arbitrary")]
24221    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24222        use arbitrary::{Arbitrary, Unstructured};
24223        let mut buf = [0u8; 1024];
24224        rng.fill_bytes(&mut buf);
24225        let mut unstructured = Unstructured::new(&buf);
24226        Self::arbitrary(&mut unstructured).unwrap_or_default()
24227    }
24228}
24229impl Default for PARAM_MAP_RC_DATA {
24230    fn default() -> Self {
24231        Self::DEFAULT.clone()
24232    }
24233}
24234impl MessageData for PARAM_MAP_RC_DATA {
24235    type Message = MavMessage;
24236    const ID: u32 = 50u32;
24237    const NAME: &'static str = "PARAM_MAP_RC";
24238    const EXTRA_CRC: u8 = 78u8;
24239    const ENCODED_LEN: usize = 37usize;
24240    fn deser(
24241        _version: MavlinkVersion,
24242        __input: &[u8],
24243    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24244        let avail_len = __input.len();
24245        let mut payload_buf = [0; Self::ENCODED_LEN];
24246        let mut buf = if avail_len < Self::ENCODED_LEN {
24247            payload_buf[0..avail_len].copy_from_slice(__input);
24248            Bytes::new(&payload_buf)
24249        } else {
24250            Bytes::new(__input)
24251        };
24252        let mut __struct = Self::default();
24253        __struct.param_value0 = buf.get_f32_le();
24254        __struct.scale = buf.get_f32_le();
24255        __struct.param_value_min = buf.get_f32_le();
24256        __struct.param_value_max = buf.get_f32_le();
24257        __struct.param_index = buf.get_i16_le();
24258        __struct.target_system = buf.get_u8();
24259        __struct.target_component = buf.get_u8();
24260        for v in &mut __struct.param_id {
24261            let val = buf.get_u8();
24262            *v = val;
24263        }
24264        __struct.parameter_rc_channel_index = buf.get_u8();
24265        Ok(__struct)
24266    }
24267    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24268        let mut __tmp = BytesMut::new(bytes);
24269        #[allow(clippy::absurd_extreme_comparisons)]
24270        #[allow(unused_comparisons)]
24271        if __tmp.remaining() < Self::ENCODED_LEN {
24272            panic!(
24273                "buffer is too small (need {} bytes, but got {})",
24274                Self::ENCODED_LEN,
24275                __tmp.remaining(),
24276            )
24277        }
24278        __tmp.put_f32_le(self.param_value0);
24279        __tmp.put_f32_le(self.scale);
24280        __tmp.put_f32_le(self.param_value_min);
24281        __tmp.put_f32_le(self.param_value_max);
24282        __tmp.put_i16_le(self.param_index);
24283        __tmp.put_u8(self.target_system);
24284        __tmp.put_u8(self.target_component);
24285        for val in &self.param_id {
24286            __tmp.put_u8(*val);
24287        }
24288        __tmp.put_u8(self.parameter_rc_channel_index);
24289        if matches!(version, MavlinkVersion::V2) {
24290            let len = __tmp.len();
24291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24292        } else {
24293            __tmp.len()
24294        }
24295    }
24296}
24297#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24298#[doc = ""]
24299#[doc = "ID: 21"]
24300#[derive(Debug, Clone, PartialEq)]
24301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24303#[cfg_attr(feature = "ts", derive(TS))]
24304#[cfg_attr(feature = "ts", ts(export))]
24305pub struct PARAM_REQUEST_LIST_DATA {
24306    #[doc = "System ID"]
24307    pub target_system: u8,
24308    #[doc = "Component ID"]
24309    pub target_component: u8,
24310}
24311impl PARAM_REQUEST_LIST_DATA {
24312    pub const ENCODED_LEN: usize = 2usize;
24313    pub const DEFAULT: Self = Self {
24314        target_system: 0_u8,
24315        target_component: 0_u8,
24316    };
24317    #[cfg(feature = "arbitrary")]
24318    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24319        use arbitrary::{Arbitrary, Unstructured};
24320        let mut buf = [0u8; 1024];
24321        rng.fill_bytes(&mut buf);
24322        let mut unstructured = Unstructured::new(&buf);
24323        Self::arbitrary(&mut unstructured).unwrap_or_default()
24324    }
24325}
24326impl Default for PARAM_REQUEST_LIST_DATA {
24327    fn default() -> Self {
24328        Self::DEFAULT.clone()
24329    }
24330}
24331impl MessageData for PARAM_REQUEST_LIST_DATA {
24332    type Message = MavMessage;
24333    const ID: u32 = 21u32;
24334    const NAME: &'static str = "PARAM_REQUEST_LIST";
24335    const EXTRA_CRC: u8 = 159u8;
24336    const ENCODED_LEN: usize = 2usize;
24337    fn deser(
24338        _version: MavlinkVersion,
24339        __input: &[u8],
24340    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24341        let avail_len = __input.len();
24342        let mut payload_buf = [0; Self::ENCODED_LEN];
24343        let mut buf = if avail_len < Self::ENCODED_LEN {
24344            payload_buf[0..avail_len].copy_from_slice(__input);
24345            Bytes::new(&payload_buf)
24346        } else {
24347            Bytes::new(__input)
24348        };
24349        let mut __struct = Self::default();
24350        __struct.target_system = buf.get_u8();
24351        __struct.target_component = buf.get_u8();
24352        Ok(__struct)
24353    }
24354    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24355        let mut __tmp = BytesMut::new(bytes);
24356        #[allow(clippy::absurd_extreme_comparisons)]
24357        #[allow(unused_comparisons)]
24358        if __tmp.remaining() < Self::ENCODED_LEN {
24359            panic!(
24360                "buffer is too small (need {} bytes, but got {})",
24361                Self::ENCODED_LEN,
24362                __tmp.remaining(),
24363            )
24364        }
24365        __tmp.put_u8(self.target_system);
24366        __tmp.put_u8(self.target_component);
24367        if matches!(version, MavlinkVersion::V2) {
24368            let len = __tmp.len();
24369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24370        } else {
24371            __tmp.len()
24372        }
24373    }
24374}
24375#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24376#[doc = ""]
24377#[doc = "ID: 20"]
24378#[derive(Debug, Clone, PartialEq)]
24379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24381#[cfg_attr(feature = "ts", derive(TS))]
24382#[cfg_attr(feature = "ts", ts(export))]
24383pub struct PARAM_REQUEST_READ_DATA {
24384    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24385    pub param_index: i16,
24386    #[doc = "System ID"]
24387    pub target_system: u8,
24388    #[doc = "Component ID"]
24389    pub target_component: u8,
24390    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24391    #[cfg_attr(
24392        feature = "serde",
24393        serde(
24394            serialize_with = "crate::nulstr::serialize::<_, 16>",
24395            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
24396        )
24397    )]
24398    #[cfg_attr(feature = "ts", ts(type = "string"))]
24399    pub param_id: [u8; 16],
24400}
24401impl PARAM_REQUEST_READ_DATA {
24402    pub const ENCODED_LEN: usize = 20usize;
24403    pub const DEFAULT: Self = Self {
24404        param_index: 0_i16,
24405        target_system: 0_u8,
24406        target_component: 0_u8,
24407        param_id: [0_u8; 16usize],
24408    };
24409    #[cfg(feature = "arbitrary")]
24410    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24411        use arbitrary::{Arbitrary, Unstructured};
24412        let mut buf = [0u8; 1024];
24413        rng.fill_bytes(&mut buf);
24414        let mut unstructured = Unstructured::new(&buf);
24415        Self::arbitrary(&mut unstructured).unwrap_or_default()
24416    }
24417}
24418impl Default for PARAM_REQUEST_READ_DATA {
24419    fn default() -> Self {
24420        Self::DEFAULT.clone()
24421    }
24422}
24423impl MessageData for PARAM_REQUEST_READ_DATA {
24424    type Message = MavMessage;
24425    const ID: u32 = 20u32;
24426    const NAME: &'static str = "PARAM_REQUEST_READ";
24427    const EXTRA_CRC: u8 = 214u8;
24428    const ENCODED_LEN: usize = 20usize;
24429    fn deser(
24430        _version: MavlinkVersion,
24431        __input: &[u8],
24432    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24433        let avail_len = __input.len();
24434        let mut payload_buf = [0; Self::ENCODED_LEN];
24435        let mut buf = if avail_len < Self::ENCODED_LEN {
24436            payload_buf[0..avail_len].copy_from_slice(__input);
24437            Bytes::new(&payload_buf)
24438        } else {
24439            Bytes::new(__input)
24440        };
24441        let mut __struct = Self::default();
24442        __struct.param_index = buf.get_i16_le();
24443        __struct.target_system = buf.get_u8();
24444        __struct.target_component = buf.get_u8();
24445        for v in &mut __struct.param_id {
24446            let val = buf.get_u8();
24447            *v = val;
24448        }
24449        Ok(__struct)
24450    }
24451    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24452        let mut __tmp = BytesMut::new(bytes);
24453        #[allow(clippy::absurd_extreme_comparisons)]
24454        #[allow(unused_comparisons)]
24455        if __tmp.remaining() < Self::ENCODED_LEN {
24456            panic!(
24457                "buffer is too small (need {} bytes, but got {})",
24458                Self::ENCODED_LEN,
24459                __tmp.remaining(),
24460            )
24461        }
24462        __tmp.put_i16_le(self.param_index);
24463        __tmp.put_u8(self.target_system);
24464        __tmp.put_u8(self.target_component);
24465        for val in &self.param_id {
24466            __tmp.put_u8(*val);
24467        }
24468        if matches!(version, MavlinkVersion::V2) {
24469            let len = __tmp.len();
24470            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24471        } else {
24472            __tmp.len()
24473        }
24474    }
24475}
24476#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24477#[doc = ""]
24478#[doc = "ID: 23"]
24479#[derive(Debug, Clone, PartialEq)]
24480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24482#[cfg_attr(feature = "ts", derive(TS))]
24483#[cfg_attr(feature = "ts", ts(export))]
24484pub struct PARAM_SET_DATA {
24485    #[doc = "Onboard parameter value"]
24486    pub param_value: f32,
24487    #[doc = "System ID"]
24488    pub target_system: u8,
24489    #[doc = "Component ID"]
24490    pub target_component: u8,
24491    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24492    #[cfg_attr(
24493        feature = "serde",
24494        serde(
24495            serialize_with = "crate::nulstr::serialize::<_, 16>",
24496            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
24497        )
24498    )]
24499    #[cfg_attr(feature = "ts", ts(type = "string"))]
24500    pub param_id: [u8; 16],
24501    #[doc = "Onboard parameter type."]
24502    pub param_type: MavParamType,
24503}
24504impl PARAM_SET_DATA {
24505    pub const ENCODED_LEN: usize = 23usize;
24506    pub const DEFAULT: Self = Self {
24507        param_value: 0.0_f32,
24508        target_system: 0_u8,
24509        target_component: 0_u8,
24510        param_id: [0_u8; 16usize],
24511        param_type: MavParamType::DEFAULT,
24512    };
24513    #[cfg(feature = "arbitrary")]
24514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24515        use arbitrary::{Arbitrary, Unstructured};
24516        let mut buf = [0u8; 1024];
24517        rng.fill_bytes(&mut buf);
24518        let mut unstructured = Unstructured::new(&buf);
24519        Self::arbitrary(&mut unstructured).unwrap_or_default()
24520    }
24521}
24522impl Default for PARAM_SET_DATA {
24523    fn default() -> Self {
24524        Self::DEFAULT.clone()
24525    }
24526}
24527impl MessageData for PARAM_SET_DATA {
24528    type Message = MavMessage;
24529    const ID: u32 = 23u32;
24530    const NAME: &'static str = "PARAM_SET";
24531    const EXTRA_CRC: u8 = 168u8;
24532    const ENCODED_LEN: usize = 23usize;
24533    fn deser(
24534        _version: MavlinkVersion,
24535        __input: &[u8],
24536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24537        let avail_len = __input.len();
24538        let mut payload_buf = [0; Self::ENCODED_LEN];
24539        let mut buf = if avail_len < Self::ENCODED_LEN {
24540            payload_buf[0..avail_len].copy_from_slice(__input);
24541            Bytes::new(&payload_buf)
24542        } else {
24543            Bytes::new(__input)
24544        };
24545        let mut __struct = Self::default();
24546        __struct.param_value = buf.get_f32_le();
24547        __struct.target_system = buf.get_u8();
24548        __struct.target_component = buf.get_u8();
24549        for v in &mut __struct.param_id {
24550            let val = buf.get_u8();
24551            *v = val;
24552        }
24553        let tmp = buf.get_u8();
24554        __struct.param_type =
24555            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24556                enum_type: "MavParamType",
24557                value: tmp as u32,
24558            })?;
24559        Ok(__struct)
24560    }
24561    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24562        let mut __tmp = BytesMut::new(bytes);
24563        #[allow(clippy::absurd_extreme_comparisons)]
24564        #[allow(unused_comparisons)]
24565        if __tmp.remaining() < Self::ENCODED_LEN {
24566            panic!(
24567                "buffer is too small (need {} bytes, but got {})",
24568                Self::ENCODED_LEN,
24569                __tmp.remaining(),
24570            )
24571        }
24572        __tmp.put_f32_le(self.param_value);
24573        __tmp.put_u8(self.target_system);
24574        __tmp.put_u8(self.target_component);
24575        for val in &self.param_id {
24576            __tmp.put_u8(*val);
24577        }
24578        __tmp.put_u8(self.param_type as u8);
24579        if matches!(version, MavlinkVersion::V2) {
24580            let len = __tmp.len();
24581            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24582        } else {
24583            __tmp.len()
24584        }
24585    }
24586}
24587#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24588#[doc = ""]
24589#[doc = "ID: 22"]
24590#[derive(Debug, Clone, PartialEq)]
24591#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24593#[cfg_attr(feature = "ts", derive(TS))]
24594#[cfg_attr(feature = "ts", ts(export))]
24595pub struct PARAM_VALUE_DATA {
24596    #[doc = "Onboard parameter value"]
24597    pub param_value: f32,
24598    #[doc = "Total number of onboard parameters"]
24599    pub param_count: u16,
24600    #[doc = "Index of this onboard parameter"]
24601    pub param_index: u16,
24602    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24603    #[cfg_attr(
24604        feature = "serde",
24605        serde(
24606            serialize_with = "crate::nulstr::serialize::<_, 16>",
24607            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
24608        )
24609    )]
24610    #[cfg_attr(feature = "ts", ts(type = "string"))]
24611    pub param_id: [u8; 16],
24612    #[doc = "Onboard parameter type."]
24613    pub param_type: MavParamType,
24614}
24615impl PARAM_VALUE_DATA {
24616    pub const ENCODED_LEN: usize = 25usize;
24617    pub const DEFAULT: Self = Self {
24618        param_value: 0.0_f32,
24619        param_count: 0_u16,
24620        param_index: 0_u16,
24621        param_id: [0_u8; 16usize],
24622        param_type: MavParamType::DEFAULT,
24623    };
24624    #[cfg(feature = "arbitrary")]
24625    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24626        use arbitrary::{Arbitrary, Unstructured};
24627        let mut buf = [0u8; 1024];
24628        rng.fill_bytes(&mut buf);
24629        let mut unstructured = Unstructured::new(&buf);
24630        Self::arbitrary(&mut unstructured).unwrap_or_default()
24631    }
24632}
24633impl Default for PARAM_VALUE_DATA {
24634    fn default() -> Self {
24635        Self::DEFAULT.clone()
24636    }
24637}
24638impl MessageData for PARAM_VALUE_DATA {
24639    type Message = MavMessage;
24640    const ID: u32 = 22u32;
24641    const NAME: &'static str = "PARAM_VALUE";
24642    const EXTRA_CRC: u8 = 220u8;
24643    const ENCODED_LEN: usize = 25usize;
24644    fn deser(
24645        _version: MavlinkVersion,
24646        __input: &[u8],
24647    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24648        let avail_len = __input.len();
24649        let mut payload_buf = [0; Self::ENCODED_LEN];
24650        let mut buf = if avail_len < Self::ENCODED_LEN {
24651            payload_buf[0..avail_len].copy_from_slice(__input);
24652            Bytes::new(&payload_buf)
24653        } else {
24654            Bytes::new(__input)
24655        };
24656        let mut __struct = Self::default();
24657        __struct.param_value = buf.get_f32_le();
24658        __struct.param_count = buf.get_u16_le();
24659        __struct.param_index = buf.get_u16_le();
24660        for v in &mut __struct.param_id {
24661            let val = buf.get_u8();
24662            *v = val;
24663        }
24664        let tmp = buf.get_u8();
24665        __struct.param_type =
24666            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24667                enum_type: "MavParamType",
24668                value: tmp as u32,
24669            })?;
24670        Ok(__struct)
24671    }
24672    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24673        let mut __tmp = BytesMut::new(bytes);
24674        #[allow(clippy::absurd_extreme_comparisons)]
24675        #[allow(unused_comparisons)]
24676        if __tmp.remaining() < Self::ENCODED_LEN {
24677            panic!(
24678                "buffer is too small (need {} bytes, but got {})",
24679                Self::ENCODED_LEN,
24680                __tmp.remaining(),
24681            )
24682        }
24683        __tmp.put_f32_le(self.param_value);
24684        __tmp.put_u16_le(self.param_count);
24685        __tmp.put_u16_le(self.param_index);
24686        for val in &self.param_id {
24687            __tmp.put_u8(*val);
24688        }
24689        __tmp.put_u8(self.param_type as u8);
24690        if matches!(version, MavlinkVersion::V2) {
24691            let len = __tmp.len();
24692            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24693        } else {
24694            __tmp.len()
24695        }
24696    }
24697}
24698#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24699#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24700#[doc = ""]
24701#[doc = "ID: 4"]
24702#[derive(Debug, Clone, PartialEq)]
24703#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24704#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24705#[cfg_attr(feature = "ts", derive(TS))]
24706#[cfg_attr(feature = "ts", ts(export))]
24707pub struct PING_DATA {
24708    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24709    pub time_usec: u64,
24710    #[doc = "PING sequence"]
24711    pub seq: u32,
24712    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24713    pub target_system: u8,
24714    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24715    pub target_component: u8,
24716}
24717impl PING_DATA {
24718    pub const ENCODED_LEN: usize = 14usize;
24719    pub const DEFAULT: Self = Self {
24720        time_usec: 0_u64,
24721        seq: 0_u32,
24722        target_system: 0_u8,
24723        target_component: 0_u8,
24724    };
24725    #[cfg(feature = "arbitrary")]
24726    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24727        use arbitrary::{Arbitrary, Unstructured};
24728        let mut buf = [0u8; 1024];
24729        rng.fill_bytes(&mut buf);
24730        let mut unstructured = Unstructured::new(&buf);
24731        Self::arbitrary(&mut unstructured).unwrap_or_default()
24732    }
24733}
24734impl Default for PING_DATA {
24735    fn default() -> Self {
24736        Self::DEFAULT.clone()
24737    }
24738}
24739impl MessageData for PING_DATA {
24740    type Message = MavMessage;
24741    const ID: u32 = 4u32;
24742    const NAME: &'static str = "PING";
24743    const EXTRA_CRC: u8 = 237u8;
24744    const ENCODED_LEN: usize = 14usize;
24745    fn deser(
24746        _version: MavlinkVersion,
24747        __input: &[u8],
24748    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24749        let avail_len = __input.len();
24750        let mut payload_buf = [0; Self::ENCODED_LEN];
24751        let mut buf = if avail_len < Self::ENCODED_LEN {
24752            payload_buf[0..avail_len].copy_from_slice(__input);
24753            Bytes::new(&payload_buf)
24754        } else {
24755            Bytes::new(__input)
24756        };
24757        let mut __struct = Self::default();
24758        __struct.time_usec = buf.get_u64_le();
24759        __struct.seq = buf.get_u32_le();
24760        __struct.target_system = buf.get_u8();
24761        __struct.target_component = buf.get_u8();
24762        Ok(__struct)
24763    }
24764    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24765        let mut __tmp = BytesMut::new(bytes);
24766        #[allow(clippy::absurd_extreme_comparisons)]
24767        #[allow(unused_comparisons)]
24768        if __tmp.remaining() < Self::ENCODED_LEN {
24769            panic!(
24770                "buffer is too small (need {} bytes, but got {})",
24771                Self::ENCODED_LEN,
24772                __tmp.remaining(),
24773            )
24774        }
24775        __tmp.put_u64_le(self.time_usec);
24776        __tmp.put_u32_le(self.seq);
24777        __tmp.put_u8(self.target_system);
24778        __tmp.put_u8(self.target_component);
24779        if matches!(version, MavlinkVersion::V2) {
24780            let len = __tmp.len();
24781            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24782        } else {
24783            __tmp.len()
24784        }
24785    }
24786}
24787#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24788#[doc = "Control vehicle tone generation (buzzer)."]
24789#[doc = ""]
24790#[doc = "ID: 258"]
24791#[derive(Debug, Clone, PartialEq)]
24792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24793#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24794#[cfg_attr(feature = "ts", derive(TS))]
24795#[cfg_attr(feature = "ts", ts(export))]
24796pub struct PLAY_TUNE_DATA {
24797    #[doc = "System ID"]
24798    pub target_system: u8,
24799    #[doc = "Component ID"]
24800    pub target_component: u8,
24801    #[doc = "tune in board specific format"]
24802    #[cfg_attr(
24803        feature = "serde",
24804        serde(
24805            serialize_with = "crate::nulstr::serialize::<_, 30>",
24806            deserialize_with = "crate::nulstr::deserialize::<_, 30>"
24807        )
24808    )]
24809    #[cfg_attr(feature = "ts", ts(type = "string"))]
24810    pub tune: [u8; 30],
24811    #[doc = "tune extension (appended to tune)"]
24812    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24813    #[cfg_attr(
24814        feature = "serde",
24815        serde(
24816            serialize_with = "crate::nulstr::serialize::<_, 200>",
24817            deserialize_with = "crate::nulstr::deserialize::<_, 200>"
24818        )
24819    )]
24820    #[cfg_attr(feature = "ts", ts(type = "string"))]
24821    pub tune2: [u8; 200],
24822}
24823impl PLAY_TUNE_DATA {
24824    pub const ENCODED_LEN: usize = 232usize;
24825    pub const DEFAULT: Self = Self {
24826        target_system: 0_u8,
24827        target_component: 0_u8,
24828        tune: [0_u8; 30usize],
24829        tune2: [0_u8; 200usize],
24830    };
24831    #[cfg(feature = "arbitrary")]
24832    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24833        use arbitrary::{Arbitrary, Unstructured};
24834        let mut buf = [0u8; 1024];
24835        rng.fill_bytes(&mut buf);
24836        let mut unstructured = Unstructured::new(&buf);
24837        Self::arbitrary(&mut unstructured).unwrap_or_default()
24838    }
24839}
24840impl Default for PLAY_TUNE_DATA {
24841    fn default() -> Self {
24842        Self::DEFAULT.clone()
24843    }
24844}
24845impl MessageData for PLAY_TUNE_DATA {
24846    type Message = MavMessage;
24847    const ID: u32 = 258u32;
24848    const NAME: &'static str = "PLAY_TUNE";
24849    const EXTRA_CRC: u8 = 187u8;
24850    const ENCODED_LEN: usize = 232usize;
24851    fn deser(
24852        _version: MavlinkVersion,
24853        __input: &[u8],
24854    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24855        let avail_len = __input.len();
24856        let mut payload_buf = [0; Self::ENCODED_LEN];
24857        let mut buf = if avail_len < Self::ENCODED_LEN {
24858            payload_buf[0..avail_len].copy_from_slice(__input);
24859            Bytes::new(&payload_buf)
24860        } else {
24861            Bytes::new(__input)
24862        };
24863        let mut __struct = Self::default();
24864        __struct.target_system = buf.get_u8();
24865        __struct.target_component = buf.get_u8();
24866        for v in &mut __struct.tune {
24867            let val = buf.get_u8();
24868            *v = val;
24869        }
24870        for v in &mut __struct.tune2 {
24871            let val = buf.get_u8();
24872            *v = val;
24873        }
24874        Ok(__struct)
24875    }
24876    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24877        let mut __tmp = BytesMut::new(bytes);
24878        #[allow(clippy::absurd_extreme_comparisons)]
24879        #[allow(unused_comparisons)]
24880        if __tmp.remaining() < Self::ENCODED_LEN {
24881            panic!(
24882                "buffer is too small (need {} bytes, but got {})",
24883                Self::ENCODED_LEN,
24884                __tmp.remaining(),
24885            )
24886        }
24887        __tmp.put_u8(self.target_system);
24888        __tmp.put_u8(self.target_component);
24889        for val in &self.tune {
24890            __tmp.put_u8(*val);
24891        }
24892        if matches!(version, MavlinkVersion::V2) {
24893            for val in &self.tune2 {
24894                __tmp.put_u8(*val);
24895            }
24896            let len = __tmp.len();
24897            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24898        } else {
24899            __tmp.len()
24900        }
24901    }
24902}
24903#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24904#[doc = ""]
24905#[doc = "ID: 400"]
24906#[derive(Debug, Clone, PartialEq)]
24907#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24908#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24909#[cfg_attr(feature = "ts", derive(TS))]
24910#[cfg_attr(feature = "ts", ts(export))]
24911pub struct PLAY_TUNE_V2_DATA {
24912    #[doc = "Tune format"]
24913    pub format: TuneFormat,
24914    #[doc = "System ID"]
24915    pub target_system: u8,
24916    #[doc = "Component ID"]
24917    pub target_component: u8,
24918    #[doc = "Tune definition as a NULL-terminated string."]
24919    #[cfg_attr(
24920        feature = "serde",
24921        serde(
24922            serialize_with = "crate::nulstr::serialize::<_, 248>",
24923            deserialize_with = "crate::nulstr::deserialize::<_, 248>"
24924        )
24925    )]
24926    #[cfg_attr(feature = "ts", ts(type = "string"))]
24927    pub tune: [u8; 248],
24928}
24929impl PLAY_TUNE_V2_DATA {
24930    pub const ENCODED_LEN: usize = 254usize;
24931    pub const DEFAULT: Self = Self {
24932        format: TuneFormat::DEFAULT,
24933        target_system: 0_u8,
24934        target_component: 0_u8,
24935        tune: [0_u8; 248usize],
24936    };
24937    #[cfg(feature = "arbitrary")]
24938    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24939        use arbitrary::{Arbitrary, Unstructured};
24940        let mut buf = [0u8; 1024];
24941        rng.fill_bytes(&mut buf);
24942        let mut unstructured = Unstructured::new(&buf);
24943        Self::arbitrary(&mut unstructured).unwrap_or_default()
24944    }
24945}
24946impl Default for PLAY_TUNE_V2_DATA {
24947    fn default() -> Self {
24948        Self::DEFAULT.clone()
24949    }
24950}
24951impl MessageData for PLAY_TUNE_V2_DATA {
24952    type Message = MavMessage;
24953    const ID: u32 = 400u32;
24954    const NAME: &'static str = "PLAY_TUNE_V2";
24955    const EXTRA_CRC: u8 = 110u8;
24956    const ENCODED_LEN: usize = 254usize;
24957    fn deser(
24958        _version: MavlinkVersion,
24959        __input: &[u8],
24960    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24961        let avail_len = __input.len();
24962        let mut payload_buf = [0; Self::ENCODED_LEN];
24963        let mut buf = if avail_len < Self::ENCODED_LEN {
24964            payload_buf[0..avail_len].copy_from_slice(__input);
24965            Bytes::new(&payload_buf)
24966        } else {
24967            Bytes::new(__input)
24968        };
24969        let mut __struct = Self::default();
24970        let tmp = buf.get_u32_le();
24971        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24972            ::mavlink_core::error::ParserError::InvalidEnum {
24973                enum_type: "TuneFormat",
24974                value: tmp as u32,
24975            },
24976        )?;
24977        __struct.target_system = buf.get_u8();
24978        __struct.target_component = buf.get_u8();
24979        for v in &mut __struct.tune {
24980            let val = buf.get_u8();
24981            *v = val;
24982        }
24983        Ok(__struct)
24984    }
24985    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24986        let mut __tmp = BytesMut::new(bytes);
24987        #[allow(clippy::absurd_extreme_comparisons)]
24988        #[allow(unused_comparisons)]
24989        if __tmp.remaining() < Self::ENCODED_LEN {
24990            panic!(
24991                "buffer is too small (need {} bytes, but got {})",
24992                Self::ENCODED_LEN,
24993                __tmp.remaining(),
24994            )
24995        }
24996        __tmp.put_u32_le(self.format as u32);
24997        __tmp.put_u8(self.target_system);
24998        __tmp.put_u8(self.target_component);
24999        for val in &self.tune {
25000            __tmp.put_u8(*val);
25001        }
25002        if matches!(version, MavlinkVersion::V2) {
25003            let len = __tmp.len();
25004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25005        } else {
25006            __tmp.len()
25007        }
25008    }
25009}
25010#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
25011#[doc = ""]
25012#[doc = "ID: 87"]
25013#[derive(Debug, Clone, PartialEq)]
25014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25016#[cfg_attr(feature = "ts", derive(TS))]
25017#[cfg_attr(feature = "ts", ts(export))]
25018pub struct POSITION_TARGET_GLOBAL_INT_DATA {
25019    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
25020    pub time_boot_ms: u32,
25021    #[doc = "Latitude in WGS84 frame"]
25022    pub lat_int: i32,
25023    #[doc = "Longitude in WGS84 frame"]
25024    pub lon_int: i32,
25025    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
25026    pub alt: f32,
25027    #[doc = "X velocity in NED frame"]
25028    pub vx: f32,
25029    #[doc = "Y velocity in NED frame"]
25030    pub vy: f32,
25031    #[doc = "Z velocity in NED frame"]
25032    pub vz: f32,
25033    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25034    pub afx: f32,
25035    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25036    pub afy: f32,
25037    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25038    pub afz: f32,
25039    #[doc = "yaw setpoint"]
25040    pub yaw: f32,
25041    #[doc = "yaw rate setpoint"]
25042    pub yaw_rate: f32,
25043    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25044    pub type_mask: PositionTargetTypemask,
25045    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
25046    pub coordinate_frame: MavFrame,
25047}
25048impl POSITION_TARGET_GLOBAL_INT_DATA {
25049    pub const ENCODED_LEN: usize = 51usize;
25050    pub const DEFAULT: Self = Self {
25051        time_boot_ms: 0_u32,
25052        lat_int: 0_i32,
25053        lon_int: 0_i32,
25054        alt: 0.0_f32,
25055        vx: 0.0_f32,
25056        vy: 0.0_f32,
25057        vz: 0.0_f32,
25058        afx: 0.0_f32,
25059        afy: 0.0_f32,
25060        afz: 0.0_f32,
25061        yaw: 0.0_f32,
25062        yaw_rate: 0.0_f32,
25063        type_mask: PositionTargetTypemask::DEFAULT,
25064        coordinate_frame: MavFrame::DEFAULT,
25065    };
25066    #[cfg(feature = "arbitrary")]
25067    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25068        use arbitrary::{Arbitrary, Unstructured};
25069        let mut buf = [0u8; 1024];
25070        rng.fill_bytes(&mut buf);
25071        let mut unstructured = Unstructured::new(&buf);
25072        Self::arbitrary(&mut unstructured).unwrap_or_default()
25073    }
25074}
25075impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
25076    fn default() -> Self {
25077        Self::DEFAULT.clone()
25078    }
25079}
25080impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
25081    type Message = MavMessage;
25082    const ID: u32 = 87u32;
25083    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
25084    const EXTRA_CRC: u8 = 150u8;
25085    const ENCODED_LEN: usize = 51usize;
25086    fn deser(
25087        _version: MavlinkVersion,
25088        __input: &[u8],
25089    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25090        let avail_len = __input.len();
25091        let mut payload_buf = [0; Self::ENCODED_LEN];
25092        let mut buf = if avail_len < Self::ENCODED_LEN {
25093            payload_buf[0..avail_len].copy_from_slice(__input);
25094            Bytes::new(&payload_buf)
25095        } else {
25096            Bytes::new(__input)
25097        };
25098        let mut __struct = Self::default();
25099        __struct.time_boot_ms = buf.get_u32_le();
25100        __struct.lat_int = buf.get_i32_le();
25101        __struct.lon_int = buf.get_i32_le();
25102        __struct.alt = buf.get_f32_le();
25103        __struct.vx = buf.get_f32_le();
25104        __struct.vy = buf.get_f32_le();
25105        __struct.vz = buf.get_f32_le();
25106        __struct.afx = buf.get_f32_le();
25107        __struct.afy = buf.get_f32_le();
25108        __struct.afz = buf.get_f32_le();
25109        __struct.yaw = buf.get_f32_le();
25110        __struct.yaw_rate = buf.get_f32_le();
25111        let tmp = buf.get_u16_le();
25112        __struct.type_mask = PositionTargetTypemask::from_bits(
25113            tmp & PositionTargetTypemask::all().bits(),
25114        )
25115        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25116            flag_type: "PositionTargetTypemask",
25117            value: tmp as u32,
25118        })?;
25119        let tmp = buf.get_u8();
25120        __struct.coordinate_frame =
25121            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25122                enum_type: "MavFrame",
25123                value: tmp as u32,
25124            })?;
25125        Ok(__struct)
25126    }
25127    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25128        let mut __tmp = BytesMut::new(bytes);
25129        #[allow(clippy::absurd_extreme_comparisons)]
25130        #[allow(unused_comparisons)]
25131        if __tmp.remaining() < Self::ENCODED_LEN {
25132            panic!(
25133                "buffer is too small (need {} bytes, but got {})",
25134                Self::ENCODED_LEN,
25135                __tmp.remaining(),
25136            )
25137        }
25138        __tmp.put_u32_le(self.time_boot_ms);
25139        __tmp.put_i32_le(self.lat_int);
25140        __tmp.put_i32_le(self.lon_int);
25141        __tmp.put_f32_le(self.alt);
25142        __tmp.put_f32_le(self.vx);
25143        __tmp.put_f32_le(self.vy);
25144        __tmp.put_f32_le(self.vz);
25145        __tmp.put_f32_le(self.afx);
25146        __tmp.put_f32_le(self.afy);
25147        __tmp.put_f32_le(self.afz);
25148        __tmp.put_f32_le(self.yaw);
25149        __tmp.put_f32_le(self.yaw_rate);
25150        __tmp.put_u16_le(self.type_mask.bits());
25151        __tmp.put_u8(self.coordinate_frame as u8);
25152        if matches!(version, MavlinkVersion::V2) {
25153            let len = __tmp.len();
25154            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25155        } else {
25156            __tmp.len()
25157        }
25158    }
25159}
25160#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
25161#[doc = ""]
25162#[doc = "ID: 85"]
25163#[derive(Debug, Clone, PartialEq)]
25164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25166#[cfg_attr(feature = "ts", derive(TS))]
25167#[cfg_attr(feature = "ts", ts(export))]
25168pub struct POSITION_TARGET_LOCAL_NED_DATA {
25169    #[doc = "Timestamp (time since system boot)."]
25170    pub time_boot_ms: u32,
25171    #[doc = "X Position in NED frame"]
25172    pub x: f32,
25173    #[doc = "Y Position in NED frame"]
25174    pub y: f32,
25175    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
25176    pub z: f32,
25177    #[doc = "X velocity in NED frame"]
25178    pub vx: f32,
25179    #[doc = "Y velocity in NED frame"]
25180    pub vy: f32,
25181    #[doc = "Z velocity in NED frame"]
25182    pub vz: f32,
25183    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25184    pub afx: f32,
25185    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25186    pub afy: f32,
25187    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25188    pub afz: f32,
25189    #[doc = "yaw setpoint"]
25190    pub yaw: f32,
25191    #[doc = "yaw rate setpoint"]
25192    pub yaw_rate: f32,
25193    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25194    pub type_mask: PositionTargetTypemask,
25195    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
25196    pub coordinate_frame: MavFrame,
25197}
25198impl POSITION_TARGET_LOCAL_NED_DATA {
25199    pub const ENCODED_LEN: usize = 51usize;
25200    pub const DEFAULT: Self = Self {
25201        time_boot_ms: 0_u32,
25202        x: 0.0_f32,
25203        y: 0.0_f32,
25204        z: 0.0_f32,
25205        vx: 0.0_f32,
25206        vy: 0.0_f32,
25207        vz: 0.0_f32,
25208        afx: 0.0_f32,
25209        afy: 0.0_f32,
25210        afz: 0.0_f32,
25211        yaw: 0.0_f32,
25212        yaw_rate: 0.0_f32,
25213        type_mask: PositionTargetTypemask::DEFAULT,
25214        coordinate_frame: MavFrame::DEFAULT,
25215    };
25216    #[cfg(feature = "arbitrary")]
25217    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25218        use arbitrary::{Arbitrary, Unstructured};
25219        let mut buf = [0u8; 1024];
25220        rng.fill_bytes(&mut buf);
25221        let mut unstructured = Unstructured::new(&buf);
25222        Self::arbitrary(&mut unstructured).unwrap_or_default()
25223    }
25224}
25225impl Default for POSITION_TARGET_LOCAL_NED_DATA {
25226    fn default() -> Self {
25227        Self::DEFAULT.clone()
25228    }
25229}
25230impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
25231    type Message = MavMessage;
25232    const ID: u32 = 85u32;
25233    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
25234    const EXTRA_CRC: u8 = 140u8;
25235    const ENCODED_LEN: usize = 51usize;
25236    fn deser(
25237        _version: MavlinkVersion,
25238        __input: &[u8],
25239    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25240        let avail_len = __input.len();
25241        let mut payload_buf = [0; Self::ENCODED_LEN];
25242        let mut buf = if avail_len < Self::ENCODED_LEN {
25243            payload_buf[0..avail_len].copy_from_slice(__input);
25244            Bytes::new(&payload_buf)
25245        } else {
25246            Bytes::new(__input)
25247        };
25248        let mut __struct = Self::default();
25249        __struct.time_boot_ms = buf.get_u32_le();
25250        __struct.x = buf.get_f32_le();
25251        __struct.y = buf.get_f32_le();
25252        __struct.z = buf.get_f32_le();
25253        __struct.vx = buf.get_f32_le();
25254        __struct.vy = buf.get_f32_le();
25255        __struct.vz = buf.get_f32_le();
25256        __struct.afx = buf.get_f32_le();
25257        __struct.afy = buf.get_f32_le();
25258        __struct.afz = buf.get_f32_le();
25259        __struct.yaw = buf.get_f32_le();
25260        __struct.yaw_rate = buf.get_f32_le();
25261        let tmp = buf.get_u16_le();
25262        __struct.type_mask = PositionTargetTypemask::from_bits(
25263            tmp & PositionTargetTypemask::all().bits(),
25264        )
25265        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25266            flag_type: "PositionTargetTypemask",
25267            value: tmp as u32,
25268        })?;
25269        let tmp = buf.get_u8();
25270        __struct.coordinate_frame =
25271            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25272                enum_type: "MavFrame",
25273                value: tmp as u32,
25274            })?;
25275        Ok(__struct)
25276    }
25277    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25278        let mut __tmp = BytesMut::new(bytes);
25279        #[allow(clippy::absurd_extreme_comparisons)]
25280        #[allow(unused_comparisons)]
25281        if __tmp.remaining() < Self::ENCODED_LEN {
25282            panic!(
25283                "buffer is too small (need {} bytes, but got {})",
25284                Self::ENCODED_LEN,
25285                __tmp.remaining(),
25286            )
25287        }
25288        __tmp.put_u32_le(self.time_boot_ms);
25289        __tmp.put_f32_le(self.x);
25290        __tmp.put_f32_le(self.y);
25291        __tmp.put_f32_le(self.z);
25292        __tmp.put_f32_le(self.vx);
25293        __tmp.put_f32_le(self.vy);
25294        __tmp.put_f32_le(self.vz);
25295        __tmp.put_f32_le(self.afx);
25296        __tmp.put_f32_le(self.afy);
25297        __tmp.put_f32_le(self.afz);
25298        __tmp.put_f32_le(self.yaw);
25299        __tmp.put_f32_le(self.yaw_rate);
25300        __tmp.put_u16_le(self.type_mask.bits());
25301        __tmp.put_u8(self.coordinate_frame as u8);
25302        if matches!(version, MavlinkVersion::V2) {
25303            let len = __tmp.len();
25304            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25305        } else {
25306            __tmp.len()
25307        }
25308    }
25309}
25310#[doc = "Power supply status."]
25311#[doc = ""]
25312#[doc = "ID: 125"]
25313#[derive(Debug, Clone, PartialEq)]
25314#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25316#[cfg_attr(feature = "ts", derive(TS))]
25317#[cfg_attr(feature = "ts", ts(export))]
25318pub struct POWER_STATUS_DATA {
25319    #[doc = "5V rail voltage."]
25320    pub Vcc: u16,
25321    #[doc = "Servo rail voltage."]
25322    pub Vservo: u16,
25323    #[doc = "Bitmap of power supply status flags."]
25324    pub flags: MavPowerStatus,
25325}
25326impl POWER_STATUS_DATA {
25327    pub const ENCODED_LEN: usize = 6usize;
25328    pub const DEFAULT: Self = Self {
25329        Vcc: 0_u16,
25330        Vservo: 0_u16,
25331        flags: MavPowerStatus::DEFAULT,
25332    };
25333    #[cfg(feature = "arbitrary")]
25334    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25335        use arbitrary::{Arbitrary, Unstructured};
25336        let mut buf = [0u8; 1024];
25337        rng.fill_bytes(&mut buf);
25338        let mut unstructured = Unstructured::new(&buf);
25339        Self::arbitrary(&mut unstructured).unwrap_or_default()
25340    }
25341}
25342impl Default for POWER_STATUS_DATA {
25343    fn default() -> Self {
25344        Self::DEFAULT.clone()
25345    }
25346}
25347impl MessageData for POWER_STATUS_DATA {
25348    type Message = MavMessage;
25349    const ID: u32 = 125u32;
25350    const NAME: &'static str = "POWER_STATUS";
25351    const EXTRA_CRC: u8 = 203u8;
25352    const ENCODED_LEN: usize = 6usize;
25353    fn deser(
25354        _version: MavlinkVersion,
25355        __input: &[u8],
25356    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25357        let avail_len = __input.len();
25358        let mut payload_buf = [0; Self::ENCODED_LEN];
25359        let mut buf = if avail_len < Self::ENCODED_LEN {
25360            payload_buf[0..avail_len].copy_from_slice(__input);
25361            Bytes::new(&payload_buf)
25362        } else {
25363            Bytes::new(__input)
25364        };
25365        let mut __struct = Self::default();
25366        __struct.Vcc = buf.get_u16_le();
25367        __struct.Vservo = buf.get_u16_le();
25368        let tmp = buf.get_u16_le();
25369        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
25370            ::mavlink_core::error::ParserError::InvalidFlag {
25371                flag_type: "MavPowerStatus",
25372                value: tmp as u32,
25373            },
25374        )?;
25375        Ok(__struct)
25376    }
25377    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25378        let mut __tmp = BytesMut::new(bytes);
25379        #[allow(clippy::absurd_extreme_comparisons)]
25380        #[allow(unused_comparisons)]
25381        if __tmp.remaining() < Self::ENCODED_LEN {
25382            panic!(
25383                "buffer is too small (need {} bytes, but got {})",
25384                Self::ENCODED_LEN,
25385                __tmp.remaining(),
25386            )
25387        }
25388        __tmp.put_u16_le(self.Vcc);
25389        __tmp.put_u16_le(self.Vservo);
25390        __tmp.put_u16_le(self.flags.bits());
25391        if matches!(version, MavlinkVersion::V2) {
25392            let len = __tmp.len();
25393            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25394        } else {
25395            __tmp.len()
25396        }
25397    }
25398}
25399#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25400#[doc = ""]
25401#[doc = "ID: 300"]
25402#[derive(Debug, Clone, PartialEq)]
25403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25404#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25405#[cfg_attr(feature = "ts", derive(TS))]
25406#[cfg_attr(feature = "ts", ts(export))]
25407pub struct PROTOCOL_VERSION_DATA {
25408    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25409    pub version: u16,
25410    #[doc = "Minimum MAVLink version supported"]
25411    pub min_version: u16,
25412    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25413    pub max_version: u16,
25414    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25415    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25416    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25417    pub spec_version_hash: [u8; 8],
25418    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25419    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25420    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25421    pub library_version_hash: [u8; 8],
25422}
25423impl PROTOCOL_VERSION_DATA {
25424    pub const ENCODED_LEN: usize = 22usize;
25425    pub const DEFAULT: Self = Self {
25426        version: 0_u16,
25427        min_version: 0_u16,
25428        max_version: 0_u16,
25429        spec_version_hash: [0_u8; 8usize],
25430        library_version_hash: [0_u8; 8usize],
25431    };
25432    #[cfg(feature = "arbitrary")]
25433    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25434        use arbitrary::{Arbitrary, Unstructured};
25435        let mut buf = [0u8; 1024];
25436        rng.fill_bytes(&mut buf);
25437        let mut unstructured = Unstructured::new(&buf);
25438        Self::arbitrary(&mut unstructured).unwrap_or_default()
25439    }
25440}
25441impl Default for PROTOCOL_VERSION_DATA {
25442    fn default() -> Self {
25443        Self::DEFAULT.clone()
25444    }
25445}
25446impl MessageData for PROTOCOL_VERSION_DATA {
25447    type Message = MavMessage;
25448    const ID: u32 = 300u32;
25449    const NAME: &'static str = "PROTOCOL_VERSION";
25450    const EXTRA_CRC: u8 = 217u8;
25451    const ENCODED_LEN: usize = 22usize;
25452    fn deser(
25453        _version: MavlinkVersion,
25454        __input: &[u8],
25455    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25456        let avail_len = __input.len();
25457        let mut payload_buf = [0; Self::ENCODED_LEN];
25458        let mut buf = if avail_len < Self::ENCODED_LEN {
25459            payload_buf[0..avail_len].copy_from_slice(__input);
25460            Bytes::new(&payload_buf)
25461        } else {
25462            Bytes::new(__input)
25463        };
25464        let mut __struct = Self::default();
25465        __struct.version = buf.get_u16_le();
25466        __struct.min_version = buf.get_u16_le();
25467        __struct.max_version = buf.get_u16_le();
25468        for v in &mut __struct.spec_version_hash {
25469            let val = buf.get_u8();
25470            *v = val;
25471        }
25472        for v in &mut __struct.library_version_hash {
25473            let val = buf.get_u8();
25474            *v = val;
25475        }
25476        Ok(__struct)
25477    }
25478    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25479        let mut __tmp = BytesMut::new(bytes);
25480        #[allow(clippy::absurd_extreme_comparisons)]
25481        #[allow(unused_comparisons)]
25482        if __tmp.remaining() < Self::ENCODED_LEN {
25483            panic!(
25484                "buffer is too small (need {} bytes, but got {})",
25485                Self::ENCODED_LEN,
25486                __tmp.remaining(),
25487            )
25488        }
25489        __tmp.put_u16_le(self.version);
25490        __tmp.put_u16_le(self.min_version);
25491        __tmp.put_u16_le(self.max_version);
25492        for val in &self.spec_version_hash {
25493            __tmp.put_u8(*val);
25494        }
25495        for val in &self.library_version_hash {
25496            __tmp.put_u8(*val);
25497        }
25498        if matches!(version, MavlinkVersion::V2) {
25499            let len = __tmp.len();
25500            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25501        } else {
25502            __tmp.len()
25503        }
25504    }
25505}
25506#[doc = "Status generated by radio and injected into MAVLink stream."]
25507#[doc = ""]
25508#[doc = "ID: 109"]
25509#[derive(Debug, Clone, PartialEq)]
25510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25512#[cfg_attr(feature = "ts", derive(TS))]
25513#[cfg_attr(feature = "ts", ts(export))]
25514pub struct RADIO_STATUS_DATA {
25515    #[doc = "Count of radio packet receive errors (since boot)."]
25516    pub rxerrors: u16,
25517    #[doc = "Count of error corrected radio packets (since boot)."]
25518    pub fixed: u16,
25519    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25520    pub rssi: u8,
25521    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25522    pub remrssi: u8,
25523    #[doc = "Remaining free transmitter buffer space."]
25524    pub txbuf: u8,
25525    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25526    pub noise: u8,
25527    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25528    pub remnoise: u8,
25529}
25530impl RADIO_STATUS_DATA {
25531    pub const ENCODED_LEN: usize = 9usize;
25532    pub const DEFAULT: Self = Self {
25533        rxerrors: 0_u16,
25534        fixed: 0_u16,
25535        rssi: 0_u8,
25536        remrssi: 0_u8,
25537        txbuf: 0_u8,
25538        noise: 0_u8,
25539        remnoise: 0_u8,
25540    };
25541    #[cfg(feature = "arbitrary")]
25542    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25543        use arbitrary::{Arbitrary, Unstructured};
25544        let mut buf = [0u8; 1024];
25545        rng.fill_bytes(&mut buf);
25546        let mut unstructured = Unstructured::new(&buf);
25547        Self::arbitrary(&mut unstructured).unwrap_or_default()
25548    }
25549}
25550impl Default for RADIO_STATUS_DATA {
25551    fn default() -> Self {
25552        Self::DEFAULT.clone()
25553    }
25554}
25555impl MessageData for RADIO_STATUS_DATA {
25556    type Message = MavMessage;
25557    const ID: u32 = 109u32;
25558    const NAME: &'static str = "RADIO_STATUS";
25559    const EXTRA_CRC: u8 = 185u8;
25560    const ENCODED_LEN: usize = 9usize;
25561    fn deser(
25562        _version: MavlinkVersion,
25563        __input: &[u8],
25564    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25565        let avail_len = __input.len();
25566        let mut payload_buf = [0; Self::ENCODED_LEN];
25567        let mut buf = if avail_len < Self::ENCODED_LEN {
25568            payload_buf[0..avail_len].copy_from_slice(__input);
25569            Bytes::new(&payload_buf)
25570        } else {
25571            Bytes::new(__input)
25572        };
25573        let mut __struct = Self::default();
25574        __struct.rxerrors = buf.get_u16_le();
25575        __struct.fixed = buf.get_u16_le();
25576        __struct.rssi = buf.get_u8();
25577        __struct.remrssi = buf.get_u8();
25578        __struct.txbuf = buf.get_u8();
25579        __struct.noise = buf.get_u8();
25580        __struct.remnoise = buf.get_u8();
25581        Ok(__struct)
25582    }
25583    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25584        let mut __tmp = BytesMut::new(bytes);
25585        #[allow(clippy::absurd_extreme_comparisons)]
25586        #[allow(unused_comparisons)]
25587        if __tmp.remaining() < Self::ENCODED_LEN {
25588            panic!(
25589                "buffer is too small (need {} bytes, but got {})",
25590                Self::ENCODED_LEN,
25591                __tmp.remaining(),
25592            )
25593        }
25594        __tmp.put_u16_le(self.rxerrors);
25595        __tmp.put_u16_le(self.fixed);
25596        __tmp.put_u8(self.rssi);
25597        __tmp.put_u8(self.remrssi);
25598        __tmp.put_u8(self.txbuf);
25599        __tmp.put_u8(self.noise);
25600        __tmp.put_u8(self.remnoise);
25601        if matches!(version, MavlinkVersion::V2) {
25602            let len = __tmp.len();
25603            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25604        } else {
25605            __tmp.len()
25606        }
25607    }
25608}
25609#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25610#[doc = ""]
25611#[doc = "ID: 27"]
25612#[derive(Debug, Clone, PartialEq)]
25613#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25614#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25615#[cfg_attr(feature = "ts", derive(TS))]
25616#[cfg_attr(feature = "ts", ts(export))]
25617pub struct RAW_IMU_DATA {
25618    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25619    pub time_usec: u64,
25620    #[doc = "X acceleration (raw)"]
25621    pub xacc: i16,
25622    #[doc = "Y acceleration (raw)"]
25623    pub yacc: i16,
25624    #[doc = "Z acceleration (raw)"]
25625    pub zacc: i16,
25626    #[doc = "Angular speed around X axis (raw)"]
25627    pub xgyro: i16,
25628    #[doc = "Angular speed around Y axis (raw)"]
25629    pub ygyro: i16,
25630    #[doc = "Angular speed around Z axis (raw)"]
25631    pub zgyro: i16,
25632    #[doc = "X Magnetic field (raw)"]
25633    pub xmag: i16,
25634    #[doc = "Y Magnetic field (raw)"]
25635    pub ymag: i16,
25636    #[doc = "Z Magnetic field (raw)"]
25637    pub zmag: i16,
25638    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25639    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25640    pub id: u8,
25641    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25642    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25643    pub temperature: i16,
25644}
25645impl RAW_IMU_DATA {
25646    pub const ENCODED_LEN: usize = 29usize;
25647    pub const DEFAULT: Self = Self {
25648        time_usec: 0_u64,
25649        xacc: 0_i16,
25650        yacc: 0_i16,
25651        zacc: 0_i16,
25652        xgyro: 0_i16,
25653        ygyro: 0_i16,
25654        zgyro: 0_i16,
25655        xmag: 0_i16,
25656        ymag: 0_i16,
25657        zmag: 0_i16,
25658        id: 0_u8,
25659        temperature: 0_i16,
25660    };
25661    #[cfg(feature = "arbitrary")]
25662    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25663        use arbitrary::{Arbitrary, Unstructured};
25664        let mut buf = [0u8; 1024];
25665        rng.fill_bytes(&mut buf);
25666        let mut unstructured = Unstructured::new(&buf);
25667        Self::arbitrary(&mut unstructured).unwrap_or_default()
25668    }
25669}
25670impl Default for RAW_IMU_DATA {
25671    fn default() -> Self {
25672        Self::DEFAULT.clone()
25673    }
25674}
25675impl MessageData for RAW_IMU_DATA {
25676    type Message = MavMessage;
25677    const ID: u32 = 27u32;
25678    const NAME: &'static str = "RAW_IMU";
25679    const EXTRA_CRC: u8 = 144u8;
25680    const ENCODED_LEN: usize = 29usize;
25681    fn deser(
25682        _version: MavlinkVersion,
25683        __input: &[u8],
25684    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25685        let avail_len = __input.len();
25686        let mut payload_buf = [0; Self::ENCODED_LEN];
25687        let mut buf = if avail_len < Self::ENCODED_LEN {
25688            payload_buf[0..avail_len].copy_from_slice(__input);
25689            Bytes::new(&payload_buf)
25690        } else {
25691            Bytes::new(__input)
25692        };
25693        let mut __struct = Self::default();
25694        __struct.time_usec = buf.get_u64_le();
25695        __struct.xacc = buf.get_i16_le();
25696        __struct.yacc = buf.get_i16_le();
25697        __struct.zacc = buf.get_i16_le();
25698        __struct.xgyro = buf.get_i16_le();
25699        __struct.ygyro = buf.get_i16_le();
25700        __struct.zgyro = buf.get_i16_le();
25701        __struct.xmag = buf.get_i16_le();
25702        __struct.ymag = buf.get_i16_le();
25703        __struct.zmag = buf.get_i16_le();
25704        __struct.id = buf.get_u8();
25705        __struct.temperature = buf.get_i16_le();
25706        Ok(__struct)
25707    }
25708    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25709        let mut __tmp = BytesMut::new(bytes);
25710        #[allow(clippy::absurd_extreme_comparisons)]
25711        #[allow(unused_comparisons)]
25712        if __tmp.remaining() < Self::ENCODED_LEN {
25713            panic!(
25714                "buffer is too small (need {} bytes, but got {})",
25715                Self::ENCODED_LEN,
25716                __tmp.remaining(),
25717            )
25718        }
25719        __tmp.put_u64_le(self.time_usec);
25720        __tmp.put_i16_le(self.xacc);
25721        __tmp.put_i16_le(self.yacc);
25722        __tmp.put_i16_le(self.zacc);
25723        __tmp.put_i16_le(self.xgyro);
25724        __tmp.put_i16_le(self.ygyro);
25725        __tmp.put_i16_le(self.zgyro);
25726        __tmp.put_i16_le(self.xmag);
25727        __tmp.put_i16_le(self.ymag);
25728        __tmp.put_i16_le(self.zmag);
25729        if matches!(version, MavlinkVersion::V2) {
25730            __tmp.put_u8(self.id);
25731            __tmp.put_i16_le(self.temperature);
25732            let len = __tmp.len();
25733            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25734        } else {
25735            __tmp.len()
25736        }
25737    }
25738}
25739#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25740#[doc = ""]
25741#[doc = "ID: 28"]
25742#[derive(Debug, Clone, PartialEq)]
25743#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25744#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25745#[cfg_attr(feature = "ts", derive(TS))]
25746#[cfg_attr(feature = "ts", ts(export))]
25747pub struct RAW_PRESSURE_DATA {
25748    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25749    pub time_usec: u64,
25750    #[doc = "Absolute pressure (raw)"]
25751    pub press_abs: i16,
25752    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25753    pub press_diff1: i16,
25754    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25755    pub press_diff2: i16,
25756    #[doc = "Raw Temperature measurement (raw)"]
25757    pub temperature: i16,
25758}
25759impl RAW_PRESSURE_DATA {
25760    pub const ENCODED_LEN: usize = 16usize;
25761    pub const DEFAULT: Self = Self {
25762        time_usec: 0_u64,
25763        press_abs: 0_i16,
25764        press_diff1: 0_i16,
25765        press_diff2: 0_i16,
25766        temperature: 0_i16,
25767    };
25768    #[cfg(feature = "arbitrary")]
25769    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25770        use arbitrary::{Arbitrary, Unstructured};
25771        let mut buf = [0u8; 1024];
25772        rng.fill_bytes(&mut buf);
25773        let mut unstructured = Unstructured::new(&buf);
25774        Self::arbitrary(&mut unstructured).unwrap_or_default()
25775    }
25776}
25777impl Default for RAW_PRESSURE_DATA {
25778    fn default() -> Self {
25779        Self::DEFAULT.clone()
25780    }
25781}
25782impl MessageData for RAW_PRESSURE_DATA {
25783    type Message = MavMessage;
25784    const ID: u32 = 28u32;
25785    const NAME: &'static str = "RAW_PRESSURE";
25786    const EXTRA_CRC: u8 = 67u8;
25787    const ENCODED_LEN: usize = 16usize;
25788    fn deser(
25789        _version: MavlinkVersion,
25790        __input: &[u8],
25791    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25792        let avail_len = __input.len();
25793        let mut payload_buf = [0; Self::ENCODED_LEN];
25794        let mut buf = if avail_len < Self::ENCODED_LEN {
25795            payload_buf[0..avail_len].copy_from_slice(__input);
25796            Bytes::new(&payload_buf)
25797        } else {
25798            Bytes::new(__input)
25799        };
25800        let mut __struct = Self::default();
25801        __struct.time_usec = buf.get_u64_le();
25802        __struct.press_abs = buf.get_i16_le();
25803        __struct.press_diff1 = buf.get_i16_le();
25804        __struct.press_diff2 = buf.get_i16_le();
25805        __struct.temperature = buf.get_i16_le();
25806        Ok(__struct)
25807    }
25808    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25809        let mut __tmp = BytesMut::new(bytes);
25810        #[allow(clippy::absurd_extreme_comparisons)]
25811        #[allow(unused_comparisons)]
25812        if __tmp.remaining() < Self::ENCODED_LEN {
25813            panic!(
25814                "buffer is too small (need {} bytes, but got {})",
25815                Self::ENCODED_LEN,
25816                __tmp.remaining(),
25817            )
25818        }
25819        __tmp.put_u64_le(self.time_usec);
25820        __tmp.put_i16_le(self.press_abs);
25821        __tmp.put_i16_le(self.press_diff1);
25822        __tmp.put_i16_le(self.press_diff2);
25823        __tmp.put_i16_le(self.temperature);
25824        if matches!(version, MavlinkVersion::V2) {
25825            let len = __tmp.len();
25826            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25827        } else {
25828            __tmp.len()
25829        }
25830    }
25831}
25832#[doc = "RPM sensor data message."]
25833#[doc = ""]
25834#[doc = "ID: 339"]
25835#[derive(Debug, Clone, PartialEq)]
25836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25837#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25838#[cfg_attr(feature = "ts", derive(TS))]
25839#[cfg_attr(feature = "ts", ts(export))]
25840pub struct RAW_RPM_DATA {
25841    #[doc = "Indicated rate"]
25842    pub frequency: f32,
25843    #[doc = "Index of this RPM sensor (0-indexed)"]
25844    pub index: u8,
25845}
25846impl RAW_RPM_DATA {
25847    pub const ENCODED_LEN: usize = 5usize;
25848    pub const DEFAULT: Self = Self {
25849        frequency: 0.0_f32,
25850        index: 0_u8,
25851    };
25852    #[cfg(feature = "arbitrary")]
25853    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25854        use arbitrary::{Arbitrary, Unstructured};
25855        let mut buf = [0u8; 1024];
25856        rng.fill_bytes(&mut buf);
25857        let mut unstructured = Unstructured::new(&buf);
25858        Self::arbitrary(&mut unstructured).unwrap_or_default()
25859    }
25860}
25861impl Default for RAW_RPM_DATA {
25862    fn default() -> Self {
25863        Self::DEFAULT.clone()
25864    }
25865}
25866impl MessageData for RAW_RPM_DATA {
25867    type Message = MavMessage;
25868    const ID: u32 = 339u32;
25869    const NAME: &'static str = "RAW_RPM";
25870    const EXTRA_CRC: u8 = 199u8;
25871    const ENCODED_LEN: usize = 5usize;
25872    fn deser(
25873        _version: MavlinkVersion,
25874        __input: &[u8],
25875    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25876        let avail_len = __input.len();
25877        let mut payload_buf = [0; Self::ENCODED_LEN];
25878        let mut buf = if avail_len < Self::ENCODED_LEN {
25879            payload_buf[0..avail_len].copy_from_slice(__input);
25880            Bytes::new(&payload_buf)
25881        } else {
25882            Bytes::new(__input)
25883        };
25884        let mut __struct = Self::default();
25885        __struct.frequency = buf.get_f32_le();
25886        __struct.index = buf.get_u8();
25887        Ok(__struct)
25888    }
25889    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25890        let mut __tmp = BytesMut::new(bytes);
25891        #[allow(clippy::absurd_extreme_comparisons)]
25892        #[allow(unused_comparisons)]
25893        if __tmp.remaining() < Self::ENCODED_LEN {
25894            panic!(
25895                "buffer is too small (need {} bytes, but got {})",
25896                Self::ENCODED_LEN,
25897                __tmp.remaining(),
25898            )
25899        }
25900        __tmp.put_f32_le(self.frequency);
25901        __tmp.put_u8(self.index);
25902        if matches!(version, MavlinkVersion::V2) {
25903            let len = __tmp.len();
25904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25905        } else {
25906            __tmp.len()
25907        }
25908    }
25909}
25910#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25911#[doc = ""]
25912#[doc = "ID: 65"]
25913#[derive(Debug, Clone, PartialEq)]
25914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25916#[cfg_attr(feature = "ts", derive(TS))]
25917#[cfg_attr(feature = "ts", ts(export))]
25918pub struct RC_CHANNELS_DATA {
25919    #[doc = "Timestamp (time since system boot)."]
25920    pub time_boot_ms: u32,
25921    #[doc = "RC channel 1 value."]
25922    pub chan1_raw: u16,
25923    #[doc = "RC channel 2 value."]
25924    pub chan2_raw: u16,
25925    #[doc = "RC channel 3 value."]
25926    pub chan3_raw: u16,
25927    #[doc = "RC channel 4 value."]
25928    pub chan4_raw: u16,
25929    #[doc = "RC channel 5 value."]
25930    pub chan5_raw: u16,
25931    #[doc = "RC channel 6 value."]
25932    pub chan6_raw: u16,
25933    #[doc = "RC channel 7 value."]
25934    pub chan7_raw: u16,
25935    #[doc = "RC channel 8 value."]
25936    pub chan8_raw: u16,
25937    #[doc = "RC channel 9 value."]
25938    pub chan9_raw: u16,
25939    #[doc = "RC channel 10 value."]
25940    pub chan10_raw: u16,
25941    #[doc = "RC channel 11 value."]
25942    pub chan11_raw: u16,
25943    #[doc = "RC channel 12 value."]
25944    pub chan12_raw: u16,
25945    #[doc = "RC channel 13 value."]
25946    pub chan13_raw: u16,
25947    #[doc = "RC channel 14 value."]
25948    pub chan14_raw: u16,
25949    #[doc = "RC channel 15 value."]
25950    pub chan15_raw: u16,
25951    #[doc = "RC channel 16 value."]
25952    pub chan16_raw: u16,
25953    #[doc = "RC channel 17 value."]
25954    pub chan17_raw: u16,
25955    #[doc = "RC channel 18 value."]
25956    pub chan18_raw: u16,
25957    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25958    pub chancount: u8,
25959    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25960    pub rssi: u8,
25961}
25962impl RC_CHANNELS_DATA {
25963    pub const ENCODED_LEN: usize = 42usize;
25964    pub const DEFAULT: Self = Self {
25965        time_boot_ms: 0_u32,
25966        chan1_raw: 0_u16,
25967        chan2_raw: 0_u16,
25968        chan3_raw: 0_u16,
25969        chan4_raw: 0_u16,
25970        chan5_raw: 0_u16,
25971        chan6_raw: 0_u16,
25972        chan7_raw: 0_u16,
25973        chan8_raw: 0_u16,
25974        chan9_raw: 0_u16,
25975        chan10_raw: 0_u16,
25976        chan11_raw: 0_u16,
25977        chan12_raw: 0_u16,
25978        chan13_raw: 0_u16,
25979        chan14_raw: 0_u16,
25980        chan15_raw: 0_u16,
25981        chan16_raw: 0_u16,
25982        chan17_raw: 0_u16,
25983        chan18_raw: 0_u16,
25984        chancount: 0_u8,
25985        rssi: 0_u8,
25986    };
25987    #[cfg(feature = "arbitrary")]
25988    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25989        use arbitrary::{Arbitrary, Unstructured};
25990        let mut buf = [0u8; 1024];
25991        rng.fill_bytes(&mut buf);
25992        let mut unstructured = Unstructured::new(&buf);
25993        Self::arbitrary(&mut unstructured).unwrap_or_default()
25994    }
25995}
25996impl Default for RC_CHANNELS_DATA {
25997    fn default() -> Self {
25998        Self::DEFAULT.clone()
25999    }
26000}
26001impl MessageData for RC_CHANNELS_DATA {
26002    type Message = MavMessage;
26003    const ID: u32 = 65u32;
26004    const NAME: &'static str = "RC_CHANNELS";
26005    const EXTRA_CRC: u8 = 118u8;
26006    const ENCODED_LEN: usize = 42usize;
26007    fn deser(
26008        _version: MavlinkVersion,
26009        __input: &[u8],
26010    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26011        let avail_len = __input.len();
26012        let mut payload_buf = [0; Self::ENCODED_LEN];
26013        let mut buf = if avail_len < Self::ENCODED_LEN {
26014            payload_buf[0..avail_len].copy_from_slice(__input);
26015            Bytes::new(&payload_buf)
26016        } else {
26017            Bytes::new(__input)
26018        };
26019        let mut __struct = Self::default();
26020        __struct.time_boot_ms = buf.get_u32_le();
26021        __struct.chan1_raw = buf.get_u16_le();
26022        __struct.chan2_raw = buf.get_u16_le();
26023        __struct.chan3_raw = buf.get_u16_le();
26024        __struct.chan4_raw = buf.get_u16_le();
26025        __struct.chan5_raw = buf.get_u16_le();
26026        __struct.chan6_raw = buf.get_u16_le();
26027        __struct.chan7_raw = buf.get_u16_le();
26028        __struct.chan8_raw = buf.get_u16_le();
26029        __struct.chan9_raw = buf.get_u16_le();
26030        __struct.chan10_raw = buf.get_u16_le();
26031        __struct.chan11_raw = buf.get_u16_le();
26032        __struct.chan12_raw = buf.get_u16_le();
26033        __struct.chan13_raw = buf.get_u16_le();
26034        __struct.chan14_raw = buf.get_u16_le();
26035        __struct.chan15_raw = buf.get_u16_le();
26036        __struct.chan16_raw = buf.get_u16_le();
26037        __struct.chan17_raw = buf.get_u16_le();
26038        __struct.chan18_raw = buf.get_u16_le();
26039        __struct.chancount = buf.get_u8();
26040        __struct.rssi = buf.get_u8();
26041        Ok(__struct)
26042    }
26043    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26044        let mut __tmp = BytesMut::new(bytes);
26045        #[allow(clippy::absurd_extreme_comparisons)]
26046        #[allow(unused_comparisons)]
26047        if __tmp.remaining() < Self::ENCODED_LEN {
26048            panic!(
26049                "buffer is too small (need {} bytes, but got {})",
26050                Self::ENCODED_LEN,
26051                __tmp.remaining(),
26052            )
26053        }
26054        __tmp.put_u32_le(self.time_boot_ms);
26055        __tmp.put_u16_le(self.chan1_raw);
26056        __tmp.put_u16_le(self.chan2_raw);
26057        __tmp.put_u16_le(self.chan3_raw);
26058        __tmp.put_u16_le(self.chan4_raw);
26059        __tmp.put_u16_le(self.chan5_raw);
26060        __tmp.put_u16_le(self.chan6_raw);
26061        __tmp.put_u16_le(self.chan7_raw);
26062        __tmp.put_u16_le(self.chan8_raw);
26063        __tmp.put_u16_le(self.chan9_raw);
26064        __tmp.put_u16_le(self.chan10_raw);
26065        __tmp.put_u16_le(self.chan11_raw);
26066        __tmp.put_u16_le(self.chan12_raw);
26067        __tmp.put_u16_le(self.chan13_raw);
26068        __tmp.put_u16_le(self.chan14_raw);
26069        __tmp.put_u16_le(self.chan15_raw);
26070        __tmp.put_u16_le(self.chan16_raw);
26071        __tmp.put_u16_le(self.chan17_raw);
26072        __tmp.put_u16_le(self.chan18_raw);
26073        __tmp.put_u8(self.chancount);
26074        __tmp.put_u8(self.rssi);
26075        if matches!(version, MavlinkVersion::V2) {
26076            let len = __tmp.len();
26077            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26078        } else {
26079            __tmp.len()
26080        }
26081    }
26082}
26083#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
26084#[doc = ""]
26085#[doc = "ID: 70"]
26086#[derive(Debug, Clone, PartialEq)]
26087#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26089#[cfg_attr(feature = "ts", derive(TS))]
26090#[cfg_attr(feature = "ts", ts(export))]
26091pub struct RC_CHANNELS_OVERRIDE_DATA {
26092    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26093    pub chan1_raw: u16,
26094    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26095    pub chan2_raw: u16,
26096    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26097    pub chan3_raw: u16,
26098    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26099    pub chan4_raw: u16,
26100    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26101    pub chan5_raw: u16,
26102    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26103    pub chan6_raw: u16,
26104    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26105    pub chan7_raw: u16,
26106    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26107    pub chan8_raw: u16,
26108    #[doc = "System ID"]
26109    pub target_system: u8,
26110    #[doc = "Component ID"]
26111    pub target_component: u8,
26112    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26113    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26114    pub chan9_raw: u16,
26115    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26116    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26117    pub chan10_raw: u16,
26118    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26119    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26120    pub chan11_raw: u16,
26121    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26122    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26123    pub chan12_raw: u16,
26124    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26125    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26126    pub chan13_raw: u16,
26127    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26128    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26129    pub chan14_raw: u16,
26130    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26131    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26132    pub chan15_raw: u16,
26133    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26134    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26135    pub chan16_raw: u16,
26136    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26137    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26138    pub chan17_raw: u16,
26139    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26140    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26141    pub chan18_raw: u16,
26142}
26143impl RC_CHANNELS_OVERRIDE_DATA {
26144    pub const ENCODED_LEN: usize = 38usize;
26145    pub const DEFAULT: Self = Self {
26146        chan1_raw: 0_u16,
26147        chan2_raw: 0_u16,
26148        chan3_raw: 0_u16,
26149        chan4_raw: 0_u16,
26150        chan5_raw: 0_u16,
26151        chan6_raw: 0_u16,
26152        chan7_raw: 0_u16,
26153        chan8_raw: 0_u16,
26154        target_system: 0_u8,
26155        target_component: 0_u8,
26156        chan9_raw: 0_u16,
26157        chan10_raw: 0_u16,
26158        chan11_raw: 0_u16,
26159        chan12_raw: 0_u16,
26160        chan13_raw: 0_u16,
26161        chan14_raw: 0_u16,
26162        chan15_raw: 0_u16,
26163        chan16_raw: 0_u16,
26164        chan17_raw: 0_u16,
26165        chan18_raw: 0_u16,
26166    };
26167    #[cfg(feature = "arbitrary")]
26168    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26169        use arbitrary::{Arbitrary, Unstructured};
26170        let mut buf = [0u8; 1024];
26171        rng.fill_bytes(&mut buf);
26172        let mut unstructured = Unstructured::new(&buf);
26173        Self::arbitrary(&mut unstructured).unwrap_or_default()
26174    }
26175}
26176impl Default for RC_CHANNELS_OVERRIDE_DATA {
26177    fn default() -> Self {
26178        Self::DEFAULT.clone()
26179    }
26180}
26181impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
26182    type Message = MavMessage;
26183    const ID: u32 = 70u32;
26184    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
26185    const EXTRA_CRC: u8 = 124u8;
26186    const ENCODED_LEN: usize = 38usize;
26187    fn deser(
26188        _version: MavlinkVersion,
26189        __input: &[u8],
26190    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26191        let avail_len = __input.len();
26192        let mut payload_buf = [0; Self::ENCODED_LEN];
26193        let mut buf = if avail_len < Self::ENCODED_LEN {
26194            payload_buf[0..avail_len].copy_from_slice(__input);
26195            Bytes::new(&payload_buf)
26196        } else {
26197            Bytes::new(__input)
26198        };
26199        let mut __struct = Self::default();
26200        __struct.chan1_raw = buf.get_u16_le();
26201        __struct.chan2_raw = buf.get_u16_le();
26202        __struct.chan3_raw = buf.get_u16_le();
26203        __struct.chan4_raw = buf.get_u16_le();
26204        __struct.chan5_raw = buf.get_u16_le();
26205        __struct.chan6_raw = buf.get_u16_le();
26206        __struct.chan7_raw = buf.get_u16_le();
26207        __struct.chan8_raw = buf.get_u16_le();
26208        __struct.target_system = buf.get_u8();
26209        __struct.target_component = buf.get_u8();
26210        __struct.chan9_raw = buf.get_u16_le();
26211        __struct.chan10_raw = buf.get_u16_le();
26212        __struct.chan11_raw = buf.get_u16_le();
26213        __struct.chan12_raw = buf.get_u16_le();
26214        __struct.chan13_raw = buf.get_u16_le();
26215        __struct.chan14_raw = buf.get_u16_le();
26216        __struct.chan15_raw = buf.get_u16_le();
26217        __struct.chan16_raw = buf.get_u16_le();
26218        __struct.chan17_raw = buf.get_u16_le();
26219        __struct.chan18_raw = buf.get_u16_le();
26220        Ok(__struct)
26221    }
26222    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26223        let mut __tmp = BytesMut::new(bytes);
26224        #[allow(clippy::absurd_extreme_comparisons)]
26225        #[allow(unused_comparisons)]
26226        if __tmp.remaining() < Self::ENCODED_LEN {
26227            panic!(
26228                "buffer is too small (need {} bytes, but got {})",
26229                Self::ENCODED_LEN,
26230                __tmp.remaining(),
26231            )
26232        }
26233        __tmp.put_u16_le(self.chan1_raw);
26234        __tmp.put_u16_le(self.chan2_raw);
26235        __tmp.put_u16_le(self.chan3_raw);
26236        __tmp.put_u16_le(self.chan4_raw);
26237        __tmp.put_u16_le(self.chan5_raw);
26238        __tmp.put_u16_le(self.chan6_raw);
26239        __tmp.put_u16_le(self.chan7_raw);
26240        __tmp.put_u16_le(self.chan8_raw);
26241        __tmp.put_u8(self.target_system);
26242        __tmp.put_u8(self.target_component);
26243        if matches!(version, MavlinkVersion::V2) {
26244            __tmp.put_u16_le(self.chan9_raw);
26245            __tmp.put_u16_le(self.chan10_raw);
26246            __tmp.put_u16_le(self.chan11_raw);
26247            __tmp.put_u16_le(self.chan12_raw);
26248            __tmp.put_u16_le(self.chan13_raw);
26249            __tmp.put_u16_le(self.chan14_raw);
26250            __tmp.put_u16_le(self.chan15_raw);
26251            __tmp.put_u16_le(self.chan16_raw);
26252            __tmp.put_u16_le(self.chan17_raw);
26253            __tmp.put_u16_le(self.chan18_raw);
26254            let len = __tmp.len();
26255            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26256        } else {
26257            __tmp.len()
26258        }
26259    }
26260}
26261#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26262#[doc = ""]
26263#[doc = "ID: 35"]
26264#[derive(Debug, Clone, PartialEq)]
26265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26267#[cfg_attr(feature = "ts", derive(TS))]
26268#[cfg_attr(feature = "ts", ts(export))]
26269pub struct RC_CHANNELS_RAW_DATA {
26270    #[doc = "Timestamp (time since system boot)."]
26271    pub time_boot_ms: u32,
26272    #[doc = "RC channel 1 value."]
26273    pub chan1_raw: u16,
26274    #[doc = "RC channel 2 value."]
26275    pub chan2_raw: u16,
26276    #[doc = "RC channel 3 value."]
26277    pub chan3_raw: u16,
26278    #[doc = "RC channel 4 value."]
26279    pub chan4_raw: u16,
26280    #[doc = "RC channel 5 value."]
26281    pub chan5_raw: u16,
26282    #[doc = "RC channel 6 value."]
26283    pub chan6_raw: u16,
26284    #[doc = "RC channel 7 value."]
26285    pub chan7_raw: u16,
26286    #[doc = "RC channel 8 value."]
26287    pub chan8_raw: u16,
26288    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26289    pub port: u8,
26290    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26291    pub rssi: u8,
26292}
26293impl RC_CHANNELS_RAW_DATA {
26294    pub const ENCODED_LEN: usize = 22usize;
26295    pub const DEFAULT: Self = Self {
26296        time_boot_ms: 0_u32,
26297        chan1_raw: 0_u16,
26298        chan2_raw: 0_u16,
26299        chan3_raw: 0_u16,
26300        chan4_raw: 0_u16,
26301        chan5_raw: 0_u16,
26302        chan6_raw: 0_u16,
26303        chan7_raw: 0_u16,
26304        chan8_raw: 0_u16,
26305        port: 0_u8,
26306        rssi: 0_u8,
26307    };
26308    #[cfg(feature = "arbitrary")]
26309    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26310        use arbitrary::{Arbitrary, Unstructured};
26311        let mut buf = [0u8; 1024];
26312        rng.fill_bytes(&mut buf);
26313        let mut unstructured = Unstructured::new(&buf);
26314        Self::arbitrary(&mut unstructured).unwrap_or_default()
26315    }
26316}
26317impl Default for RC_CHANNELS_RAW_DATA {
26318    fn default() -> Self {
26319        Self::DEFAULT.clone()
26320    }
26321}
26322impl MessageData for RC_CHANNELS_RAW_DATA {
26323    type Message = MavMessage;
26324    const ID: u32 = 35u32;
26325    const NAME: &'static str = "RC_CHANNELS_RAW";
26326    const EXTRA_CRC: u8 = 244u8;
26327    const ENCODED_LEN: usize = 22usize;
26328    fn deser(
26329        _version: MavlinkVersion,
26330        __input: &[u8],
26331    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26332        let avail_len = __input.len();
26333        let mut payload_buf = [0; Self::ENCODED_LEN];
26334        let mut buf = if avail_len < Self::ENCODED_LEN {
26335            payload_buf[0..avail_len].copy_from_slice(__input);
26336            Bytes::new(&payload_buf)
26337        } else {
26338            Bytes::new(__input)
26339        };
26340        let mut __struct = Self::default();
26341        __struct.time_boot_ms = buf.get_u32_le();
26342        __struct.chan1_raw = buf.get_u16_le();
26343        __struct.chan2_raw = buf.get_u16_le();
26344        __struct.chan3_raw = buf.get_u16_le();
26345        __struct.chan4_raw = buf.get_u16_le();
26346        __struct.chan5_raw = buf.get_u16_le();
26347        __struct.chan6_raw = buf.get_u16_le();
26348        __struct.chan7_raw = buf.get_u16_le();
26349        __struct.chan8_raw = buf.get_u16_le();
26350        __struct.port = buf.get_u8();
26351        __struct.rssi = buf.get_u8();
26352        Ok(__struct)
26353    }
26354    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26355        let mut __tmp = BytesMut::new(bytes);
26356        #[allow(clippy::absurd_extreme_comparisons)]
26357        #[allow(unused_comparisons)]
26358        if __tmp.remaining() < Self::ENCODED_LEN {
26359            panic!(
26360                "buffer is too small (need {} bytes, but got {})",
26361                Self::ENCODED_LEN,
26362                __tmp.remaining(),
26363            )
26364        }
26365        __tmp.put_u32_le(self.time_boot_ms);
26366        __tmp.put_u16_le(self.chan1_raw);
26367        __tmp.put_u16_le(self.chan2_raw);
26368        __tmp.put_u16_le(self.chan3_raw);
26369        __tmp.put_u16_le(self.chan4_raw);
26370        __tmp.put_u16_le(self.chan5_raw);
26371        __tmp.put_u16_le(self.chan6_raw);
26372        __tmp.put_u16_le(self.chan7_raw);
26373        __tmp.put_u16_le(self.chan8_raw);
26374        __tmp.put_u8(self.port);
26375        __tmp.put_u8(self.rssi);
26376        if matches!(version, MavlinkVersion::V2) {
26377            let len = __tmp.len();
26378            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26379        } else {
26380            __tmp.len()
26381        }
26382    }
26383}
26384#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26385#[doc = ""]
26386#[doc = "ID: 34"]
26387#[derive(Debug, Clone, PartialEq)]
26388#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26389#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26390#[cfg_attr(feature = "ts", derive(TS))]
26391#[cfg_attr(feature = "ts", ts(export))]
26392pub struct RC_CHANNELS_SCALED_DATA {
26393    #[doc = "Timestamp (time since system boot)."]
26394    pub time_boot_ms: u32,
26395    #[doc = "RC channel 1 value scaled."]
26396    pub chan1_scaled: i16,
26397    #[doc = "RC channel 2 value scaled."]
26398    pub chan2_scaled: i16,
26399    #[doc = "RC channel 3 value scaled."]
26400    pub chan3_scaled: i16,
26401    #[doc = "RC channel 4 value scaled."]
26402    pub chan4_scaled: i16,
26403    #[doc = "RC channel 5 value scaled."]
26404    pub chan5_scaled: i16,
26405    #[doc = "RC channel 6 value scaled."]
26406    pub chan6_scaled: i16,
26407    #[doc = "RC channel 7 value scaled."]
26408    pub chan7_scaled: i16,
26409    #[doc = "RC channel 8 value scaled."]
26410    pub chan8_scaled: i16,
26411    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26412    pub port: u8,
26413    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26414    pub rssi: u8,
26415}
26416impl RC_CHANNELS_SCALED_DATA {
26417    pub const ENCODED_LEN: usize = 22usize;
26418    pub const DEFAULT: Self = Self {
26419        time_boot_ms: 0_u32,
26420        chan1_scaled: 0_i16,
26421        chan2_scaled: 0_i16,
26422        chan3_scaled: 0_i16,
26423        chan4_scaled: 0_i16,
26424        chan5_scaled: 0_i16,
26425        chan6_scaled: 0_i16,
26426        chan7_scaled: 0_i16,
26427        chan8_scaled: 0_i16,
26428        port: 0_u8,
26429        rssi: 0_u8,
26430    };
26431    #[cfg(feature = "arbitrary")]
26432    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26433        use arbitrary::{Arbitrary, Unstructured};
26434        let mut buf = [0u8; 1024];
26435        rng.fill_bytes(&mut buf);
26436        let mut unstructured = Unstructured::new(&buf);
26437        Self::arbitrary(&mut unstructured).unwrap_or_default()
26438    }
26439}
26440impl Default for RC_CHANNELS_SCALED_DATA {
26441    fn default() -> Self {
26442        Self::DEFAULT.clone()
26443    }
26444}
26445impl MessageData for RC_CHANNELS_SCALED_DATA {
26446    type Message = MavMessage;
26447    const ID: u32 = 34u32;
26448    const NAME: &'static str = "RC_CHANNELS_SCALED";
26449    const EXTRA_CRC: u8 = 237u8;
26450    const ENCODED_LEN: usize = 22usize;
26451    fn deser(
26452        _version: MavlinkVersion,
26453        __input: &[u8],
26454    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26455        let avail_len = __input.len();
26456        let mut payload_buf = [0; Self::ENCODED_LEN];
26457        let mut buf = if avail_len < Self::ENCODED_LEN {
26458            payload_buf[0..avail_len].copy_from_slice(__input);
26459            Bytes::new(&payload_buf)
26460        } else {
26461            Bytes::new(__input)
26462        };
26463        let mut __struct = Self::default();
26464        __struct.time_boot_ms = buf.get_u32_le();
26465        __struct.chan1_scaled = buf.get_i16_le();
26466        __struct.chan2_scaled = buf.get_i16_le();
26467        __struct.chan3_scaled = buf.get_i16_le();
26468        __struct.chan4_scaled = buf.get_i16_le();
26469        __struct.chan5_scaled = buf.get_i16_le();
26470        __struct.chan6_scaled = buf.get_i16_le();
26471        __struct.chan7_scaled = buf.get_i16_le();
26472        __struct.chan8_scaled = buf.get_i16_le();
26473        __struct.port = buf.get_u8();
26474        __struct.rssi = buf.get_u8();
26475        Ok(__struct)
26476    }
26477    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26478        let mut __tmp = BytesMut::new(bytes);
26479        #[allow(clippy::absurd_extreme_comparisons)]
26480        #[allow(unused_comparisons)]
26481        if __tmp.remaining() < Self::ENCODED_LEN {
26482            panic!(
26483                "buffer is too small (need {} bytes, but got {})",
26484                Self::ENCODED_LEN,
26485                __tmp.remaining(),
26486            )
26487        }
26488        __tmp.put_u32_le(self.time_boot_ms);
26489        __tmp.put_i16_le(self.chan1_scaled);
26490        __tmp.put_i16_le(self.chan2_scaled);
26491        __tmp.put_i16_le(self.chan3_scaled);
26492        __tmp.put_i16_le(self.chan4_scaled);
26493        __tmp.put_i16_le(self.chan5_scaled);
26494        __tmp.put_i16_le(self.chan6_scaled);
26495        __tmp.put_i16_le(self.chan7_scaled);
26496        __tmp.put_i16_le(self.chan8_scaled);
26497        __tmp.put_u8(self.port);
26498        __tmp.put_u8(self.rssi);
26499        if matches!(version, MavlinkVersion::V2) {
26500            let len = __tmp.len();
26501            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26502        } else {
26503            __tmp.len()
26504        }
26505    }
26506}
26507#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
26508#[doc = "Request a data stream."]
26509#[doc = ""]
26510#[doc = "ID: 66"]
26511#[derive(Debug, Clone, PartialEq)]
26512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26513#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26514#[cfg_attr(feature = "ts", derive(TS))]
26515#[cfg_attr(feature = "ts", ts(export))]
26516pub struct REQUEST_DATA_STREAM_DATA {
26517    #[doc = "The requested message rate"]
26518    pub req_message_rate: u16,
26519    #[doc = "The target requested to send the message stream."]
26520    pub target_system: u8,
26521    #[doc = "The target requested to send the message stream."]
26522    pub target_component: u8,
26523    #[doc = "The ID of the requested data stream"]
26524    pub req_stream_id: u8,
26525    #[doc = "1 to start sending, 0 to stop sending."]
26526    pub start_stop: u8,
26527}
26528impl REQUEST_DATA_STREAM_DATA {
26529    pub const ENCODED_LEN: usize = 6usize;
26530    pub const DEFAULT: Self = Self {
26531        req_message_rate: 0_u16,
26532        target_system: 0_u8,
26533        target_component: 0_u8,
26534        req_stream_id: 0_u8,
26535        start_stop: 0_u8,
26536    };
26537    #[cfg(feature = "arbitrary")]
26538    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26539        use arbitrary::{Arbitrary, Unstructured};
26540        let mut buf = [0u8; 1024];
26541        rng.fill_bytes(&mut buf);
26542        let mut unstructured = Unstructured::new(&buf);
26543        Self::arbitrary(&mut unstructured).unwrap_or_default()
26544    }
26545}
26546impl Default for REQUEST_DATA_STREAM_DATA {
26547    fn default() -> Self {
26548        Self::DEFAULT.clone()
26549    }
26550}
26551impl MessageData for REQUEST_DATA_STREAM_DATA {
26552    type Message = MavMessage;
26553    const ID: u32 = 66u32;
26554    const NAME: &'static str = "REQUEST_DATA_STREAM";
26555    const EXTRA_CRC: u8 = 148u8;
26556    const ENCODED_LEN: usize = 6usize;
26557    fn deser(
26558        _version: MavlinkVersion,
26559        __input: &[u8],
26560    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26561        let avail_len = __input.len();
26562        let mut payload_buf = [0; Self::ENCODED_LEN];
26563        let mut buf = if avail_len < Self::ENCODED_LEN {
26564            payload_buf[0..avail_len].copy_from_slice(__input);
26565            Bytes::new(&payload_buf)
26566        } else {
26567            Bytes::new(__input)
26568        };
26569        let mut __struct = Self::default();
26570        __struct.req_message_rate = buf.get_u16_le();
26571        __struct.target_system = buf.get_u8();
26572        __struct.target_component = buf.get_u8();
26573        __struct.req_stream_id = buf.get_u8();
26574        __struct.start_stop = buf.get_u8();
26575        Ok(__struct)
26576    }
26577    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26578        let mut __tmp = BytesMut::new(bytes);
26579        #[allow(clippy::absurd_extreme_comparisons)]
26580        #[allow(unused_comparisons)]
26581        if __tmp.remaining() < Self::ENCODED_LEN {
26582            panic!(
26583                "buffer is too small (need {} bytes, but got {})",
26584                Self::ENCODED_LEN,
26585                __tmp.remaining(),
26586            )
26587        }
26588        __tmp.put_u16_le(self.req_message_rate);
26589        __tmp.put_u8(self.target_system);
26590        __tmp.put_u8(self.target_component);
26591        __tmp.put_u8(self.req_stream_id);
26592        __tmp.put_u8(self.start_stop);
26593        if matches!(version, MavlinkVersion::V2) {
26594            let len = __tmp.len();
26595            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26596        } else {
26597            __tmp.len()
26598        }
26599    }
26600}
26601#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26602#[doc = ""]
26603#[doc = "ID: 412"]
26604#[derive(Debug, Clone, PartialEq)]
26605#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26606#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26607#[cfg_attr(feature = "ts", derive(TS))]
26608#[cfg_attr(feature = "ts", ts(export))]
26609pub struct REQUEST_EVENT_DATA {
26610    #[doc = "First sequence number of the requested event."]
26611    pub first_sequence: u16,
26612    #[doc = "Last sequence number of the requested event."]
26613    pub last_sequence: u16,
26614    #[doc = "System ID"]
26615    pub target_system: u8,
26616    #[doc = "Component ID"]
26617    pub target_component: u8,
26618}
26619impl REQUEST_EVENT_DATA {
26620    pub const ENCODED_LEN: usize = 6usize;
26621    pub const DEFAULT: Self = Self {
26622        first_sequence: 0_u16,
26623        last_sequence: 0_u16,
26624        target_system: 0_u8,
26625        target_component: 0_u8,
26626    };
26627    #[cfg(feature = "arbitrary")]
26628    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26629        use arbitrary::{Arbitrary, Unstructured};
26630        let mut buf = [0u8; 1024];
26631        rng.fill_bytes(&mut buf);
26632        let mut unstructured = Unstructured::new(&buf);
26633        Self::arbitrary(&mut unstructured).unwrap_or_default()
26634    }
26635}
26636impl Default for REQUEST_EVENT_DATA {
26637    fn default() -> Self {
26638        Self::DEFAULT.clone()
26639    }
26640}
26641impl MessageData for REQUEST_EVENT_DATA {
26642    type Message = MavMessage;
26643    const ID: u32 = 412u32;
26644    const NAME: &'static str = "REQUEST_EVENT";
26645    const EXTRA_CRC: u8 = 33u8;
26646    const ENCODED_LEN: usize = 6usize;
26647    fn deser(
26648        _version: MavlinkVersion,
26649        __input: &[u8],
26650    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26651        let avail_len = __input.len();
26652        let mut payload_buf = [0; Self::ENCODED_LEN];
26653        let mut buf = if avail_len < Self::ENCODED_LEN {
26654            payload_buf[0..avail_len].copy_from_slice(__input);
26655            Bytes::new(&payload_buf)
26656        } else {
26657            Bytes::new(__input)
26658        };
26659        let mut __struct = Self::default();
26660        __struct.first_sequence = buf.get_u16_le();
26661        __struct.last_sequence = buf.get_u16_le();
26662        __struct.target_system = buf.get_u8();
26663        __struct.target_component = buf.get_u8();
26664        Ok(__struct)
26665    }
26666    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26667        let mut __tmp = BytesMut::new(bytes);
26668        #[allow(clippy::absurd_extreme_comparisons)]
26669        #[allow(unused_comparisons)]
26670        if __tmp.remaining() < Self::ENCODED_LEN {
26671            panic!(
26672                "buffer is too small (need {} bytes, but got {})",
26673                Self::ENCODED_LEN,
26674                __tmp.remaining(),
26675            )
26676        }
26677        __tmp.put_u16_le(self.first_sequence);
26678        __tmp.put_u16_le(self.last_sequence);
26679        __tmp.put_u8(self.target_system);
26680        __tmp.put_u8(self.target_component);
26681        if matches!(version, MavlinkVersion::V2) {
26682            let len = __tmp.len();
26683            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26684        } else {
26685            __tmp.len()
26686        }
26687    }
26688}
26689#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26690#[doc = ""]
26691#[doc = "ID: 142"]
26692#[derive(Debug, Clone, PartialEq)]
26693#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26694#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26695#[cfg_attr(feature = "ts", derive(TS))]
26696#[cfg_attr(feature = "ts", ts(export))]
26697pub struct RESOURCE_REQUEST_DATA {
26698    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26699    pub request_id: u8,
26700    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26701    pub uri_type: u8,
26702    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26703    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26704    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26705    pub uri: [u8; 120],
26706    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26707    pub transfer_type: u8,
26708    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26709    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26710    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26711    pub storage: [u8; 120],
26712}
26713impl RESOURCE_REQUEST_DATA {
26714    pub const ENCODED_LEN: usize = 243usize;
26715    pub const DEFAULT: Self = Self {
26716        request_id: 0_u8,
26717        uri_type: 0_u8,
26718        uri: [0_u8; 120usize],
26719        transfer_type: 0_u8,
26720        storage: [0_u8; 120usize],
26721    };
26722    #[cfg(feature = "arbitrary")]
26723    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26724        use arbitrary::{Arbitrary, Unstructured};
26725        let mut buf = [0u8; 1024];
26726        rng.fill_bytes(&mut buf);
26727        let mut unstructured = Unstructured::new(&buf);
26728        Self::arbitrary(&mut unstructured).unwrap_or_default()
26729    }
26730}
26731impl Default for RESOURCE_REQUEST_DATA {
26732    fn default() -> Self {
26733        Self::DEFAULT.clone()
26734    }
26735}
26736impl MessageData for RESOURCE_REQUEST_DATA {
26737    type Message = MavMessage;
26738    const ID: u32 = 142u32;
26739    const NAME: &'static str = "RESOURCE_REQUEST";
26740    const EXTRA_CRC: u8 = 72u8;
26741    const ENCODED_LEN: usize = 243usize;
26742    fn deser(
26743        _version: MavlinkVersion,
26744        __input: &[u8],
26745    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26746        let avail_len = __input.len();
26747        let mut payload_buf = [0; Self::ENCODED_LEN];
26748        let mut buf = if avail_len < Self::ENCODED_LEN {
26749            payload_buf[0..avail_len].copy_from_slice(__input);
26750            Bytes::new(&payload_buf)
26751        } else {
26752            Bytes::new(__input)
26753        };
26754        let mut __struct = Self::default();
26755        __struct.request_id = buf.get_u8();
26756        __struct.uri_type = buf.get_u8();
26757        for v in &mut __struct.uri {
26758            let val = buf.get_u8();
26759            *v = val;
26760        }
26761        __struct.transfer_type = buf.get_u8();
26762        for v in &mut __struct.storage {
26763            let val = buf.get_u8();
26764            *v = val;
26765        }
26766        Ok(__struct)
26767    }
26768    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26769        let mut __tmp = BytesMut::new(bytes);
26770        #[allow(clippy::absurd_extreme_comparisons)]
26771        #[allow(unused_comparisons)]
26772        if __tmp.remaining() < Self::ENCODED_LEN {
26773            panic!(
26774                "buffer is too small (need {} bytes, but got {})",
26775                Self::ENCODED_LEN,
26776                __tmp.remaining(),
26777            )
26778        }
26779        __tmp.put_u8(self.request_id);
26780        __tmp.put_u8(self.uri_type);
26781        for val in &self.uri {
26782            __tmp.put_u8(*val);
26783        }
26784        __tmp.put_u8(self.transfer_type);
26785        for val in &self.storage {
26786            __tmp.put_u8(*val);
26787        }
26788        if matches!(version, MavlinkVersion::V2) {
26789            let len = __tmp.len();
26790            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26791        } else {
26792            __tmp.len()
26793        }
26794    }
26795}
26796#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26797#[doc = ""]
26798#[doc = "ID: 413"]
26799#[derive(Debug, Clone, PartialEq)]
26800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26802#[cfg_attr(feature = "ts", derive(TS))]
26803#[cfg_attr(feature = "ts", ts(export))]
26804pub struct RESPONSE_EVENT_ERROR_DATA {
26805    #[doc = "Sequence number."]
26806    pub sequence: u16,
26807    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26808    pub sequence_oldest_available: u16,
26809    #[doc = "System ID"]
26810    pub target_system: u8,
26811    #[doc = "Component ID"]
26812    pub target_component: u8,
26813    #[doc = "Error reason."]
26814    pub reason: MavEventErrorReason,
26815}
26816impl RESPONSE_EVENT_ERROR_DATA {
26817    pub const ENCODED_LEN: usize = 7usize;
26818    pub const DEFAULT: Self = Self {
26819        sequence: 0_u16,
26820        sequence_oldest_available: 0_u16,
26821        target_system: 0_u8,
26822        target_component: 0_u8,
26823        reason: MavEventErrorReason::DEFAULT,
26824    };
26825    #[cfg(feature = "arbitrary")]
26826    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26827        use arbitrary::{Arbitrary, Unstructured};
26828        let mut buf = [0u8; 1024];
26829        rng.fill_bytes(&mut buf);
26830        let mut unstructured = Unstructured::new(&buf);
26831        Self::arbitrary(&mut unstructured).unwrap_or_default()
26832    }
26833}
26834impl Default for RESPONSE_EVENT_ERROR_DATA {
26835    fn default() -> Self {
26836        Self::DEFAULT.clone()
26837    }
26838}
26839impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26840    type Message = MavMessage;
26841    const ID: u32 = 413u32;
26842    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26843    const EXTRA_CRC: u8 = 77u8;
26844    const ENCODED_LEN: usize = 7usize;
26845    fn deser(
26846        _version: MavlinkVersion,
26847        __input: &[u8],
26848    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26849        let avail_len = __input.len();
26850        let mut payload_buf = [0; Self::ENCODED_LEN];
26851        let mut buf = if avail_len < Self::ENCODED_LEN {
26852            payload_buf[0..avail_len].copy_from_slice(__input);
26853            Bytes::new(&payload_buf)
26854        } else {
26855            Bytes::new(__input)
26856        };
26857        let mut __struct = Self::default();
26858        __struct.sequence = buf.get_u16_le();
26859        __struct.sequence_oldest_available = buf.get_u16_le();
26860        __struct.target_system = buf.get_u8();
26861        __struct.target_component = buf.get_u8();
26862        let tmp = buf.get_u8();
26863        __struct.reason =
26864            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26865                enum_type: "MavEventErrorReason",
26866                value: tmp as u32,
26867            })?;
26868        Ok(__struct)
26869    }
26870    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26871        let mut __tmp = BytesMut::new(bytes);
26872        #[allow(clippy::absurd_extreme_comparisons)]
26873        #[allow(unused_comparisons)]
26874        if __tmp.remaining() < Self::ENCODED_LEN {
26875            panic!(
26876                "buffer is too small (need {} bytes, but got {})",
26877                Self::ENCODED_LEN,
26878                __tmp.remaining(),
26879            )
26880        }
26881        __tmp.put_u16_le(self.sequence);
26882        __tmp.put_u16_le(self.sequence_oldest_available);
26883        __tmp.put_u8(self.target_system);
26884        __tmp.put_u8(self.target_component);
26885        __tmp.put_u8(self.reason as u8);
26886        if matches!(version, MavlinkVersion::V2) {
26887            let len = __tmp.len();
26888            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26889        } else {
26890            __tmp.len()
26891        }
26892    }
26893}
26894#[doc = "Read out the safety zone the MAV currently assumes."]
26895#[doc = ""]
26896#[doc = "ID: 55"]
26897#[derive(Debug, Clone, PartialEq)]
26898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26900#[cfg_attr(feature = "ts", derive(TS))]
26901#[cfg_attr(feature = "ts", ts(export))]
26902pub struct SAFETY_ALLOWED_AREA_DATA {
26903    #[doc = "x position 1 / Latitude 1"]
26904    pub p1x: f32,
26905    #[doc = "y position 1 / Longitude 1"]
26906    pub p1y: f32,
26907    #[doc = "z position 1 / Altitude 1"]
26908    pub p1z: f32,
26909    #[doc = "x position 2 / Latitude 2"]
26910    pub p2x: f32,
26911    #[doc = "y position 2 / Longitude 2"]
26912    pub p2y: f32,
26913    #[doc = "z position 2 / Altitude 2"]
26914    pub p2z: f32,
26915    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26916    pub frame: MavFrame,
26917}
26918impl SAFETY_ALLOWED_AREA_DATA {
26919    pub const ENCODED_LEN: usize = 25usize;
26920    pub const DEFAULT: Self = Self {
26921        p1x: 0.0_f32,
26922        p1y: 0.0_f32,
26923        p1z: 0.0_f32,
26924        p2x: 0.0_f32,
26925        p2y: 0.0_f32,
26926        p2z: 0.0_f32,
26927        frame: MavFrame::DEFAULT,
26928    };
26929    #[cfg(feature = "arbitrary")]
26930    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26931        use arbitrary::{Arbitrary, Unstructured};
26932        let mut buf = [0u8; 1024];
26933        rng.fill_bytes(&mut buf);
26934        let mut unstructured = Unstructured::new(&buf);
26935        Self::arbitrary(&mut unstructured).unwrap_or_default()
26936    }
26937}
26938impl Default for SAFETY_ALLOWED_AREA_DATA {
26939    fn default() -> Self {
26940        Self::DEFAULT.clone()
26941    }
26942}
26943impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26944    type Message = MavMessage;
26945    const ID: u32 = 55u32;
26946    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26947    const EXTRA_CRC: u8 = 3u8;
26948    const ENCODED_LEN: usize = 25usize;
26949    fn deser(
26950        _version: MavlinkVersion,
26951        __input: &[u8],
26952    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26953        let avail_len = __input.len();
26954        let mut payload_buf = [0; Self::ENCODED_LEN];
26955        let mut buf = if avail_len < Self::ENCODED_LEN {
26956            payload_buf[0..avail_len].copy_from_slice(__input);
26957            Bytes::new(&payload_buf)
26958        } else {
26959            Bytes::new(__input)
26960        };
26961        let mut __struct = Self::default();
26962        __struct.p1x = buf.get_f32_le();
26963        __struct.p1y = buf.get_f32_le();
26964        __struct.p1z = buf.get_f32_le();
26965        __struct.p2x = buf.get_f32_le();
26966        __struct.p2y = buf.get_f32_le();
26967        __struct.p2z = buf.get_f32_le();
26968        let tmp = buf.get_u8();
26969        __struct.frame =
26970            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26971                enum_type: "MavFrame",
26972                value: tmp as u32,
26973            })?;
26974        Ok(__struct)
26975    }
26976    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26977        let mut __tmp = BytesMut::new(bytes);
26978        #[allow(clippy::absurd_extreme_comparisons)]
26979        #[allow(unused_comparisons)]
26980        if __tmp.remaining() < Self::ENCODED_LEN {
26981            panic!(
26982                "buffer is too small (need {} bytes, but got {})",
26983                Self::ENCODED_LEN,
26984                __tmp.remaining(),
26985            )
26986        }
26987        __tmp.put_f32_le(self.p1x);
26988        __tmp.put_f32_le(self.p1y);
26989        __tmp.put_f32_le(self.p1z);
26990        __tmp.put_f32_le(self.p2x);
26991        __tmp.put_f32_le(self.p2y);
26992        __tmp.put_f32_le(self.p2z);
26993        __tmp.put_u8(self.frame as u8);
26994        if matches!(version, MavlinkVersion::V2) {
26995            let len = __tmp.len();
26996            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26997        } else {
26998            __tmp.len()
26999        }
27000    }
27001}
27002#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
27003#[doc = ""]
27004#[doc = "ID: 54"]
27005#[derive(Debug, Clone, PartialEq)]
27006#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27008#[cfg_attr(feature = "ts", derive(TS))]
27009#[cfg_attr(feature = "ts", ts(export))]
27010pub struct SAFETY_SET_ALLOWED_AREA_DATA {
27011    #[doc = "x position 1 / Latitude 1"]
27012    pub p1x: f32,
27013    #[doc = "y position 1 / Longitude 1"]
27014    pub p1y: f32,
27015    #[doc = "z position 1 / Altitude 1"]
27016    pub p1z: f32,
27017    #[doc = "x position 2 / Latitude 2"]
27018    pub p2x: f32,
27019    #[doc = "y position 2 / Longitude 2"]
27020    pub p2y: f32,
27021    #[doc = "z position 2 / Altitude 2"]
27022    pub p2z: f32,
27023    #[doc = "System ID"]
27024    pub target_system: u8,
27025    #[doc = "Component ID"]
27026    pub target_component: u8,
27027    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27028    pub frame: MavFrame,
27029}
27030impl SAFETY_SET_ALLOWED_AREA_DATA {
27031    pub const ENCODED_LEN: usize = 27usize;
27032    pub const DEFAULT: Self = Self {
27033        p1x: 0.0_f32,
27034        p1y: 0.0_f32,
27035        p1z: 0.0_f32,
27036        p2x: 0.0_f32,
27037        p2y: 0.0_f32,
27038        p2z: 0.0_f32,
27039        target_system: 0_u8,
27040        target_component: 0_u8,
27041        frame: MavFrame::DEFAULT,
27042    };
27043    #[cfg(feature = "arbitrary")]
27044    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27045        use arbitrary::{Arbitrary, Unstructured};
27046        let mut buf = [0u8; 1024];
27047        rng.fill_bytes(&mut buf);
27048        let mut unstructured = Unstructured::new(&buf);
27049        Self::arbitrary(&mut unstructured).unwrap_or_default()
27050    }
27051}
27052impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
27053    fn default() -> Self {
27054        Self::DEFAULT.clone()
27055    }
27056}
27057impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
27058    type Message = MavMessage;
27059    const ID: u32 = 54u32;
27060    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
27061    const EXTRA_CRC: u8 = 15u8;
27062    const ENCODED_LEN: usize = 27usize;
27063    fn deser(
27064        _version: MavlinkVersion,
27065        __input: &[u8],
27066    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27067        let avail_len = __input.len();
27068        let mut payload_buf = [0; Self::ENCODED_LEN];
27069        let mut buf = if avail_len < Self::ENCODED_LEN {
27070            payload_buf[0..avail_len].copy_from_slice(__input);
27071            Bytes::new(&payload_buf)
27072        } else {
27073            Bytes::new(__input)
27074        };
27075        let mut __struct = Self::default();
27076        __struct.p1x = buf.get_f32_le();
27077        __struct.p1y = buf.get_f32_le();
27078        __struct.p1z = buf.get_f32_le();
27079        __struct.p2x = buf.get_f32_le();
27080        __struct.p2y = buf.get_f32_le();
27081        __struct.p2z = buf.get_f32_le();
27082        __struct.target_system = buf.get_u8();
27083        __struct.target_component = buf.get_u8();
27084        let tmp = buf.get_u8();
27085        __struct.frame =
27086            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27087                enum_type: "MavFrame",
27088                value: tmp as u32,
27089            })?;
27090        Ok(__struct)
27091    }
27092    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27093        let mut __tmp = BytesMut::new(bytes);
27094        #[allow(clippy::absurd_extreme_comparisons)]
27095        #[allow(unused_comparisons)]
27096        if __tmp.remaining() < Self::ENCODED_LEN {
27097            panic!(
27098                "buffer is too small (need {} bytes, but got {})",
27099                Self::ENCODED_LEN,
27100                __tmp.remaining(),
27101            )
27102        }
27103        __tmp.put_f32_le(self.p1x);
27104        __tmp.put_f32_le(self.p1y);
27105        __tmp.put_f32_le(self.p1z);
27106        __tmp.put_f32_le(self.p2x);
27107        __tmp.put_f32_le(self.p2y);
27108        __tmp.put_f32_le(self.p2z);
27109        __tmp.put_u8(self.target_system);
27110        __tmp.put_u8(self.target_component);
27111        __tmp.put_u8(self.frame as u8);
27112        if matches!(version, MavlinkVersion::V2) {
27113            let len = __tmp.len();
27114            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27115        } else {
27116            __tmp.len()
27117        }
27118    }
27119}
27120#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
27121#[doc = ""]
27122#[doc = "ID: 26"]
27123#[derive(Debug, Clone, PartialEq)]
27124#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27126#[cfg_attr(feature = "ts", derive(TS))]
27127#[cfg_attr(feature = "ts", ts(export))]
27128pub struct SCALED_IMU_DATA {
27129    #[doc = "Timestamp (time since system boot)."]
27130    pub time_boot_ms: u32,
27131    #[doc = "X acceleration"]
27132    pub xacc: i16,
27133    #[doc = "Y acceleration"]
27134    pub yacc: i16,
27135    #[doc = "Z acceleration"]
27136    pub zacc: i16,
27137    #[doc = "Angular speed around X axis"]
27138    pub xgyro: i16,
27139    #[doc = "Angular speed around Y axis"]
27140    pub ygyro: i16,
27141    #[doc = "Angular speed around Z axis"]
27142    pub zgyro: i16,
27143    #[doc = "X Magnetic field"]
27144    pub xmag: i16,
27145    #[doc = "Y Magnetic field"]
27146    pub ymag: i16,
27147    #[doc = "Z Magnetic field"]
27148    pub zmag: i16,
27149    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27150    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27151    pub temperature: i16,
27152}
27153impl SCALED_IMU_DATA {
27154    pub const ENCODED_LEN: usize = 24usize;
27155    pub const DEFAULT: Self = Self {
27156        time_boot_ms: 0_u32,
27157        xacc: 0_i16,
27158        yacc: 0_i16,
27159        zacc: 0_i16,
27160        xgyro: 0_i16,
27161        ygyro: 0_i16,
27162        zgyro: 0_i16,
27163        xmag: 0_i16,
27164        ymag: 0_i16,
27165        zmag: 0_i16,
27166        temperature: 0_i16,
27167    };
27168    #[cfg(feature = "arbitrary")]
27169    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27170        use arbitrary::{Arbitrary, Unstructured};
27171        let mut buf = [0u8; 1024];
27172        rng.fill_bytes(&mut buf);
27173        let mut unstructured = Unstructured::new(&buf);
27174        Self::arbitrary(&mut unstructured).unwrap_or_default()
27175    }
27176}
27177impl Default for SCALED_IMU_DATA {
27178    fn default() -> Self {
27179        Self::DEFAULT.clone()
27180    }
27181}
27182impl MessageData for SCALED_IMU_DATA {
27183    type Message = MavMessage;
27184    const ID: u32 = 26u32;
27185    const NAME: &'static str = "SCALED_IMU";
27186    const EXTRA_CRC: u8 = 170u8;
27187    const ENCODED_LEN: usize = 24usize;
27188    fn deser(
27189        _version: MavlinkVersion,
27190        __input: &[u8],
27191    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27192        let avail_len = __input.len();
27193        let mut payload_buf = [0; Self::ENCODED_LEN];
27194        let mut buf = if avail_len < Self::ENCODED_LEN {
27195            payload_buf[0..avail_len].copy_from_slice(__input);
27196            Bytes::new(&payload_buf)
27197        } else {
27198            Bytes::new(__input)
27199        };
27200        let mut __struct = Self::default();
27201        __struct.time_boot_ms = buf.get_u32_le();
27202        __struct.xacc = buf.get_i16_le();
27203        __struct.yacc = buf.get_i16_le();
27204        __struct.zacc = buf.get_i16_le();
27205        __struct.xgyro = buf.get_i16_le();
27206        __struct.ygyro = buf.get_i16_le();
27207        __struct.zgyro = buf.get_i16_le();
27208        __struct.xmag = buf.get_i16_le();
27209        __struct.ymag = buf.get_i16_le();
27210        __struct.zmag = buf.get_i16_le();
27211        __struct.temperature = buf.get_i16_le();
27212        Ok(__struct)
27213    }
27214    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27215        let mut __tmp = BytesMut::new(bytes);
27216        #[allow(clippy::absurd_extreme_comparisons)]
27217        #[allow(unused_comparisons)]
27218        if __tmp.remaining() < Self::ENCODED_LEN {
27219            panic!(
27220                "buffer is too small (need {} bytes, but got {})",
27221                Self::ENCODED_LEN,
27222                __tmp.remaining(),
27223            )
27224        }
27225        __tmp.put_u32_le(self.time_boot_ms);
27226        __tmp.put_i16_le(self.xacc);
27227        __tmp.put_i16_le(self.yacc);
27228        __tmp.put_i16_le(self.zacc);
27229        __tmp.put_i16_le(self.xgyro);
27230        __tmp.put_i16_le(self.ygyro);
27231        __tmp.put_i16_le(self.zgyro);
27232        __tmp.put_i16_le(self.xmag);
27233        __tmp.put_i16_le(self.ymag);
27234        __tmp.put_i16_le(self.zmag);
27235        if matches!(version, MavlinkVersion::V2) {
27236            __tmp.put_i16_le(self.temperature);
27237            let len = __tmp.len();
27238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27239        } else {
27240            __tmp.len()
27241        }
27242    }
27243}
27244#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
27245#[doc = ""]
27246#[doc = "ID: 116"]
27247#[derive(Debug, Clone, PartialEq)]
27248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27250#[cfg_attr(feature = "ts", derive(TS))]
27251#[cfg_attr(feature = "ts", ts(export))]
27252pub struct SCALED_IMU2_DATA {
27253    #[doc = "Timestamp (time since system boot)."]
27254    pub time_boot_ms: u32,
27255    #[doc = "X acceleration"]
27256    pub xacc: i16,
27257    #[doc = "Y acceleration"]
27258    pub yacc: i16,
27259    #[doc = "Z acceleration"]
27260    pub zacc: i16,
27261    #[doc = "Angular speed around X axis"]
27262    pub xgyro: i16,
27263    #[doc = "Angular speed around Y axis"]
27264    pub ygyro: i16,
27265    #[doc = "Angular speed around Z axis"]
27266    pub zgyro: i16,
27267    #[doc = "X Magnetic field"]
27268    pub xmag: i16,
27269    #[doc = "Y Magnetic field"]
27270    pub ymag: i16,
27271    #[doc = "Z Magnetic field"]
27272    pub zmag: i16,
27273    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27274    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27275    pub temperature: i16,
27276}
27277impl SCALED_IMU2_DATA {
27278    pub const ENCODED_LEN: usize = 24usize;
27279    pub const DEFAULT: Self = Self {
27280        time_boot_ms: 0_u32,
27281        xacc: 0_i16,
27282        yacc: 0_i16,
27283        zacc: 0_i16,
27284        xgyro: 0_i16,
27285        ygyro: 0_i16,
27286        zgyro: 0_i16,
27287        xmag: 0_i16,
27288        ymag: 0_i16,
27289        zmag: 0_i16,
27290        temperature: 0_i16,
27291    };
27292    #[cfg(feature = "arbitrary")]
27293    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27294        use arbitrary::{Arbitrary, Unstructured};
27295        let mut buf = [0u8; 1024];
27296        rng.fill_bytes(&mut buf);
27297        let mut unstructured = Unstructured::new(&buf);
27298        Self::arbitrary(&mut unstructured).unwrap_or_default()
27299    }
27300}
27301impl Default for SCALED_IMU2_DATA {
27302    fn default() -> Self {
27303        Self::DEFAULT.clone()
27304    }
27305}
27306impl MessageData for SCALED_IMU2_DATA {
27307    type Message = MavMessage;
27308    const ID: u32 = 116u32;
27309    const NAME: &'static str = "SCALED_IMU2";
27310    const EXTRA_CRC: u8 = 76u8;
27311    const ENCODED_LEN: usize = 24usize;
27312    fn deser(
27313        _version: MavlinkVersion,
27314        __input: &[u8],
27315    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27316        let avail_len = __input.len();
27317        let mut payload_buf = [0; Self::ENCODED_LEN];
27318        let mut buf = if avail_len < Self::ENCODED_LEN {
27319            payload_buf[0..avail_len].copy_from_slice(__input);
27320            Bytes::new(&payload_buf)
27321        } else {
27322            Bytes::new(__input)
27323        };
27324        let mut __struct = Self::default();
27325        __struct.time_boot_ms = buf.get_u32_le();
27326        __struct.xacc = buf.get_i16_le();
27327        __struct.yacc = buf.get_i16_le();
27328        __struct.zacc = buf.get_i16_le();
27329        __struct.xgyro = buf.get_i16_le();
27330        __struct.ygyro = buf.get_i16_le();
27331        __struct.zgyro = buf.get_i16_le();
27332        __struct.xmag = buf.get_i16_le();
27333        __struct.ymag = buf.get_i16_le();
27334        __struct.zmag = buf.get_i16_le();
27335        __struct.temperature = buf.get_i16_le();
27336        Ok(__struct)
27337    }
27338    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27339        let mut __tmp = BytesMut::new(bytes);
27340        #[allow(clippy::absurd_extreme_comparisons)]
27341        #[allow(unused_comparisons)]
27342        if __tmp.remaining() < Self::ENCODED_LEN {
27343            panic!(
27344                "buffer is too small (need {} bytes, but got {})",
27345                Self::ENCODED_LEN,
27346                __tmp.remaining(),
27347            )
27348        }
27349        __tmp.put_u32_le(self.time_boot_ms);
27350        __tmp.put_i16_le(self.xacc);
27351        __tmp.put_i16_le(self.yacc);
27352        __tmp.put_i16_le(self.zacc);
27353        __tmp.put_i16_le(self.xgyro);
27354        __tmp.put_i16_le(self.ygyro);
27355        __tmp.put_i16_le(self.zgyro);
27356        __tmp.put_i16_le(self.xmag);
27357        __tmp.put_i16_le(self.ymag);
27358        __tmp.put_i16_le(self.zmag);
27359        if matches!(version, MavlinkVersion::V2) {
27360            __tmp.put_i16_le(self.temperature);
27361            let len = __tmp.len();
27362            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27363        } else {
27364            __tmp.len()
27365        }
27366    }
27367}
27368#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27369#[doc = ""]
27370#[doc = "ID: 129"]
27371#[derive(Debug, Clone, PartialEq)]
27372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27373#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27374#[cfg_attr(feature = "ts", derive(TS))]
27375#[cfg_attr(feature = "ts", ts(export))]
27376pub struct SCALED_IMU3_DATA {
27377    #[doc = "Timestamp (time since system boot)."]
27378    pub time_boot_ms: u32,
27379    #[doc = "X acceleration"]
27380    pub xacc: i16,
27381    #[doc = "Y acceleration"]
27382    pub yacc: i16,
27383    #[doc = "Z acceleration"]
27384    pub zacc: i16,
27385    #[doc = "Angular speed around X axis"]
27386    pub xgyro: i16,
27387    #[doc = "Angular speed around Y axis"]
27388    pub ygyro: i16,
27389    #[doc = "Angular speed around Z axis"]
27390    pub zgyro: i16,
27391    #[doc = "X Magnetic field"]
27392    pub xmag: i16,
27393    #[doc = "Y Magnetic field"]
27394    pub ymag: i16,
27395    #[doc = "Z Magnetic field"]
27396    pub zmag: i16,
27397    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27398    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27399    pub temperature: i16,
27400}
27401impl SCALED_IMU3_DATA {
27402    pub const ENCODED_LEN: usize = 24usize;
27403    pub const DEFAULT: Self = Self {
27404        time_boot_ms: 0_u32,
27405        xacc: 0_i16,
27406        yacc: 0_i16,
27407        zacc: 0_i16,
27408        xgyro: 0_i16,
27409        ygyro: 0_i16,
27410        zgyro: 0_i16,
27411        xmag: 0_i16,
27412        ymag: 0_i16,
27413        zmag: 0_i16,
27414        temperature: 0_i16,
27415    };
27416    #[cfg(feature = "arbitrary")]
27417    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27418        use arbitrary::{Arbitrary, Unstructured};
27419        let mut buf = [0u8; 1024];
27420        rng.fill_bytes(&mut buf);
27421        let mut unstructured = Unstructured::new(&buf);
27422        Self::arbitrary(&mut unstructured).unwrap_or_default()
27423    }
27424}
27425impl Default for SCALED_IMU3_DATA {
27426    fn default() -> Self {
27427        Self::DEFAULT.clone()
27428    }
27429}
27430impl MessageData for SCALED_IMU3_DATA {
27431    type Message = MavMessage;
27432    const ID: u32 = 129u32;
27433    const NAME: &'static str = "SCALED_IMU3";
27434    const EXTRA_CRC: u8 = 46u8;
27435    const ENCODED_LEN: usize = 24usize;
27436    fn deser(
27437        _version: MavlinkVersion,
27438        __input: &[u8],
27439    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27440        let avail_len = __input.len();
27441        let mut payload_buf = [0; Self::ENCODED_LEN];
27442        let mut buf = if avail_len < Self::ENCODED_LEN {
27443            payload_buf[0..avail_len].copy_from_slice(__input);
27444            Bytes::new(&payload_buf)
27445        } else {
27446            Bytes::new(__input)
27447        };
27448        let mut __struct = Self::default();
27449        __struct.time_boot_ms = buf.get_u32_le();
27450        __struct.xacc = buf.get_i16_le();
27451        __struct.yacc = buf.get_i16_le();
27452        __struct.zacc = buf.get_i16_le();
27453        __struct.xgyro = buf.get_i16_le();
27454        __struct.ygyro = buf.get_i16_le();
27455        __struct.zgyro = buf.get_i16_le();
27456        __struct.xmag = buf.get_i16_le();
27457        __struct.ymag = buf.get_i16_le();
27458        __struct.zmag = buf.get_i16_le();
27459        __struct.temperature = buf.get_i16_le();
27460        Ok(__struct)
27461    }
27462    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27463        let mut __tmp = BytesMut::new(bytes);
27464        #[allow(clippy::absurd_extreme_comparisons)]
27465        #[allow(unused_comparisons)]
27466        if __tmp.remaining() < Self::ENCODED_LEN {
27467            panic!(
27468                "buffer is too small (need {} bytes, but got {})",
27469                Self::ENCODED_LEN,
27470                __tmp.remaining(),
27471            )
27472        }
27473        __tmp.put_u32_le(self.time_boot_ms);
27474        __tmp.put_i16_le(self.xacc);
27475        __tmp.put_i16_le(self.yacc);
27476        __tmp.put_i16_le(self.zacc);
27477        __tmp.put_i16_le(self.xgyro);
27478        __tmp.put_i16_le(self.ygyro);
27479        __tmp.put_i16_le(self.zgyro);
27480        __tmp.put_i16_le(self.xmag);
27481        __tmp.put_i16_le(self.ymag);
27482        __tmp.put_i16_le(self.zmag);
27483        if matches!(version, MavlinkVersion::V2) {
27484            __tmp.put_i16_le(self.temperature);
27485            let len = __tmp.len();
27486            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27487        } else {
27488            __tmp.len()
27489        }
27490    }
27491}
27492#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27493#[doc = ""]
27494#[doc = "ID: 29"]
27495#[derive(Debug, Clone, PartialEq)]
27496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27498#[cfg_attr(feature = "ts", derive(TS))]
27499#[cfg_attr(feature = "ts", ts(export))]
27500pub struct SCALED_PRESSURE_DATA {
27501    #[doc = "Timestamp (time since system boot)."]
27502    pub time_boot_ms: u32,
27503    #[doc = "Absolute pressure"]
27504    pub press_abs: f32,
27505    #[doc = "Differential pressure 1"]
27506    pub press_diff: f32,
27507    #[doc = "Absolute pressure temperature"]
27508    pub temperature: i16,
27509    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27510    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27511    pub temperature_press_diff: i16,
27512}
27513impl SCALED_PRESSURE_DATA {
27514    pub const ENCODED_LEN: usize = 16usize;
27515    pub const DEFAULT: Self = Self {
27516        time_boot_ms: 0_u32,
27517        press_abs: 0.0_f32,
27518        press_diff: 0.0_f32,
27519        temperature: 0_i16,
27520        temperature_press_diff: 0_i16,
27521    };
27522    #[cfg(feature = "arbitrary")]
27523    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27524        use arbitrary::{Arbitrary, Unstructured};
27525        let mut buf = [0u8; 1024];
27526        rng.fill_bytes(&mut buf);
27527        let mut unstructured = Unstructured::new(&buf);
27528        Self::arbitrary(&mut unstructured).unwrap_or_default()
27529    }
27530}
27531impl Default for SCALED_PRESSURE_DATA {
27532    fn default() -> Self {
27533        Self::DEFAULT.clone()
27534    }
27535}
27536impl MessageData for SCALED_PRESSURE_DATA {
27537    type Message = MavMessage;
27538    const ID: u32 = 29u32;
27539    const NAME: &'static str = "SCALED_PRESSURE";
27540    const EXTRA_CRC: u8 = 115u8;
27541    const ENCODED_LEN: usize = 16usize;
27542    fn deser(
27543        _version: MavlinkVersion,
27544        __input: &[u8],
27545    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27546        let avail_len = __input.len();
27547        let mut payload_buf = [0; Self::ENCODED_LEN];
27548        let mut buf = if avail_len < Self::ENCODED_LEN {
27549            payload_buf[0..avail_len].copy_from_slice(__input);
27550            Bytes::new(&payload_buf)
27551        } else {
27552            Bytes::new(__input)
27553        };
27554        let mut __struct = Self::default();
27555        __struct.time_boot_ms = buf.get_u32_le();
27556        __struct.press_abs = buf.get_f32_le();
27557        __struct.press_diff = buf.get_f32_le();
27558        __struct.temperature = buf.get_i16_le();
27559        __struct.temperature_press_diff = buf.get_i16_le();
27560        Ok(__struct)
27561    }
27562    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27563        let mut __tmp = BytesMut::new(bytes);
27564        #[allow(clippy::absurd_extreme_comparisons)]
27565        #[allow(unused_comparisons)]
27566        if __tmp.remaining() < Self::ENCODED_LEN {
27567            panic!(
27568                "buffer is too small (need {} bytes, but got {})",
27569                Self::ENCODED_LEN,
27570                __tmp.remaining(),
27571            )
27572        }
27573        __tmp.put_u32_le(self.time_boot_ms);
27574        __tmp.put_f32_le(self.press_abs);
27575        __tmp.put_f32_le(self.press_diff);
27576        __tmp.put_i16_le(self.temperature);
27577        if matches!(version, MavlinkVersion::V2) {
27578            __tmp.put_i16_le(self.temperature_press_diff);
27579            let len = __tmp.len();
27580            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27581        } else {
27582            __tmp.len()
27583        }
27584    }
27585}
27586#[doc = "Barometer readings for 2nd barometer."]
27587#[doc = ""]
27588#[doc = "ID: 137"]
27589#[derive(Debug, Clone, PartialEq)]
27590#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27591#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27592#[cfg_attr(feature = "ts", derive(TS))]
27593#[cfg_attr(feature = "ts", ts(export))]
27594pub struct SCALED_PRESSURE2_DATA {
27595    #[doc = "Timestamp (time since system boot)."]
27596    pub time_boot_ms: u32,
27597    #[doc = "Absolute pressure"]
27598    pub press_abs: f32,
27599    #[doc = "Differential pressure"]
27600    pub press_diff: f32,
27601    #[doc = "Absolute pressure temperature"]
27602    pub temperature: i16,
27603    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27604    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27605    pub temperature_press_diff: i16,
27606}
27607impl SCALED_PRESSURE2_DATA {
27608    pub const ENCODED_LEN: usize = 16usize;
27609    pub const DEFAULT: Self = Self {
27610        time_boot_ms: 0_u32,
27611        press_abs: 0.0_f32,
27612        press_diff: 0.0_f32,
27613        temperature: 0_i16,
27614        temperature_press_diff: 0_i16,
27615    };
27616    #[cfg(feature = "arbitrary")]
27617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27618        use arbitrary::{Arbitrary, Unstructured};
27619        let mut buf = [0u8; 1024];
27620        rng.fill_bytes(&mut buf);
27621        let mut unstructured = Unstructured::new(&buf);
27622        Self::arbitrary(&mut unstructured).unwrap_or_default()
27623    }
27624}
27625impl Default for SCALED_PRESSURE2_DATA {
27626    fn default() -> Self {
27627        Self::DEFAULT.clone()
27628    }
27629}
27630impl MessageData for SCALED_PRESSURE2_DATA {
27631    type Message = MavMessage;
27632    const ID: u32 = 137u32;
27633    const NAME: &'static str = "SCALED_PRESSURE2";
27634    const EXTRA_CRC: u8 = 195u8;
27635    const ENCODED_LEN: usize = 16usize;
27636    fn deser(
27637        _version: MavlinkVersion,
27638        __input: &[u8],
27639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27640        let avail_len = __input.len();
27641        let mut payload_buf = [0; Self::ENCODED_LEN];
27642        let mut buf = if avail_len < Self::ENCODED_LEN {
27643            payload_buf[0..avail_len].copy_from_slice(__input);
27644            Bytes::new(&payload_buf)
27645        } else {
27646            Bytes::new(__input)
27647        };
27648        let mut __struct = Self::default();
27649        __struct.time_boot_ms = buf.get_u32_le();
27650        __struct.press_abs = buf.get_f32_le();
27651        __struct.press_diff = buf.get_f32_le();
27652        __struct.temperature = buf.get_i16_le();
27653        __struct.temperature_press_diff = buf.get_i16_le();
27654        Ok(__struct)
27655    }
27656    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27657        let mut __tmp = BytesMut::new(bytes);
27658        #[allow(clippy::absurd_extreme_comparisons)]
27659        #[allow(unused_comparisons)]
27660        if __tmp.remaining() < Self::ENCODED_LEN {
27661            panic!(
27662                "buffer is too small (need {} bytes, but got {})",
27663                Self::ENCODED_LEN,
27664                __tmp.remaining(),
27665            )
27666        }
27667        __tmp.put_u32_le(self.time_boot_ms);
27668        __tmp.put_f32_le(self.press_abs);
27669        __tmp.put_f32_le(self.press_diff);
27670        __tmp.put_i16_le(self.temperature);
27671        if matches!(version, MavlinkVersion::V2) {
27672            __tmp.put_i16_le(self.temperature_press_diff);
27673            let len = __tmp.len();
27674            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27675        } else {
27676            __tmp.len()
27677        }
27678    }
27679}
27680#[doc = "Barometer readings for 3rd barometer."]
27681#[doc = ""]
27682#[doc = "ID: 143"]
27683#[derive(Debug, Clone, PartialEq)]
27684#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27685#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27686#[cfg_attr(feature = "ts", derive(TS))]
27687#[cfg_attr(feature = "ts", ts(export))]
27688pub struct SCALED_PRESSURE3_DATA {
27689    #[doc = "Timestamp (time since system boot)."]
27690    pub time_boot_ms: u32,
27691    #[doc = "Absolute pressure"]
27692    pub press_abs: f32,
27693    #[doc = "Differential pressure"]
27694    pub press_diff: f32,
27695    #[doc = "Absolute pressure temperature"]
27696    pub temperature: i16,
27697    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27698    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27699    pub temperature_press_diff: i16,
27700}
27701impl SCALED_PRESSURE3_DATA {
27702    pub const ENCODED_LEN: usize = 16usize;
27703    pub const DEFAULT: Self = Self {
27704        time_boot_ms: 0_u32,
27705        press_abs: 0.0_f32,
27706        press_diff: 0.0_f32,
27707        temperature: 0_i16,
27708        temperature_press_diff: 0_i16,
27709    };
27710    #[cfg(feature = "arbitrary")]
27711    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27712        use arbitrary::{Arbitrary, Unstructured};
27713        let mut buf = [0u8; 1024];
27714        rng.fill_bytes(&mut buf);
27715        let mut unstructured = Unstructured::new(&buf);
27716        Self::arbitrary(&mut unstructured).unwrap_or_default()
27717    }
27718}
27719impl Default for SCALED_PRESSURE3_DATA {
27720    fn default() -> Self {
27721        Self::DEFAULT.clone()
27722    }
27723}
27724impl MessageData for SCALED_PRESSURE3_DATA {
27725    type Message = MavMessage;
27726    const ID: u32 = 143u32;
27727    const NAME: &'static str = "SCALED_PRESSURE3";
27728    const EXTRA_CRC: u8 = 131u8;
27729    const ENCODED_LEN: usize = 16usize;
27730    fn deser(
27731        _version: MavlinkVersion,
27732        __input: &[u8],
27733    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27734        let avail_len = __input.len();
27735        let mut payload_buf = [0; Self::ENCODED_LEN];
27736        let mut buf = if avail_len < Self::ENCODED_LEN {
27737            payload_buf[0..avail_len].copy_from_slice(__input);
27738            Bytes::new(&payload_buf)
27739        } else {
27740            Bytes::new(__input)
27741        };
27742        let mut __struct = Self::default();
27743        __struct.time_boot_ms = buf.get_u32_le();
27744        __struct.press_abs = buf.get_f32_le();
27745        __struct.press_diff = buf.get_f32_le();
27746        __struct.temperature = buf.get_i16_le();
27747        __struct.temperature_press_diff = buf.get_i16_le();
27748        Ok(__struct)
27749    }
27750    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27751        let mut __tmp = BytesMut::new(bytes);
27752        #[allow(clippy::absurd_extreme_comparisons)]
27753        #[allow(unused_comparisons)]
27754        if __tmp.remaining() < Self::ENCODED_LEN {
27755            panic!(
27756                "buffer is too small (need {} bytes, but got {})",
27757                Self::ENCODED_LEN,
27758                __tmp.remaining(),
27759            )
27760        }
27761        __tmp.put_u32_le(self.time_boot_ms);
27762        __tmp.put_f32_le(self.press_abs);
27763        __tmp.put_f32_le(self.press_diff);
27764        __tmp.put_i16_le(self.temperature);
27765        if matches!(version, MavlinkVersion::V2) {
27766            __tmp.put_i16_le(self.temperature_press_diff);
27767            let len = __tmp.len();
27768            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27769        } else {
27770            __tmp.len()
27771        }
27772    }
27773}
27774#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27775#[doc = ""]
27776#[doc = "ID: 126"]
27777#[derive(Debug, Clone, PartialEq)]
27778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27780#[cfg_attr(feature = "ts", derive(TS))]
27781#[cfg_attr(feature = "ts", ts(export))]
27782pub struct SERIAL_CONTROL_DATA {
27783    #[doc = "Baudrate of transfer. Zero means no change."]
27784    pub baudrate: u32,
27785    #[doc = "Timeout for reply data"]
27786    pub timeout: u16,
27787    #[doc = "Serial control device type."]
27788    pub device: SerialControlDev,
27789    #[doc = "Bitmap of serial control flags."]
27790    pub flags: SerialControlFlag,
27791    #[doc = "how many bytes in this transfer"]
27792    pub count: u8,
27793    #[doc = "serial data"]
27794    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27795    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27796    pub data: [u8; 70],
27797    #[doc = "System ID"]
27798    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27799    pub target_system: u8,
27800    #[doc = "Component ID"]
27801    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27802    pub target_component: u8,
27803}
27804impl SERIAL_CONTROL_DATA {
27805    pub const ENCODED_LEN: usize = 81usize;
27806    pub const DEFAULT: Self = Self {
27807        baudrate: 0_u32,
27808        timeout: 0_u16,
27809        device: SerialControlDev::DEFAULT,
27810        flags: SerialControlFlag::DEFAULT,
27811        count: 0_u8,
27812        data: [0_u8; 70usize],
27813        target_system: 0_u8,
27814        target_component: 0_u8,
27815    };
27816    #[cfg(feature = "arbitrary")]
27817    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27818        use arbitrary::{Arbitrary, Unstructured};
27819        let mut buf = [0u8; 1024];
27820        rng.fill_bytes(&mut buf);
27821        let mut unstructured = Unstructured::new(&buf);
27822        Self::arbitrary(&mut unstructured).unwrap_or_default()
27823    }
27824}
27825impl Default for SERIAL_CONTROL_DATA {
27826    fn default() -> Self {
27827        Self::DEFAULT.clone()
27828    }
27829}
27830impl MessageData for SERIAL_CONTROL_DATA {
27831    type Message = MavMessage;
27832    const ID: u32 = 126u32;
27833    const NAME: &'static str = "SERIAL_CONTROL";
27834    const EXTRA_CRC: u8 = 220u8;
27835    const ENCODED_LEN: usize = 81usize;
27836    fn deser(
27837        _version: MavlinkVersion,
27838        __input: &[u8],
27839    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27840        let avail_len = __input.len();
27841        let mut payload_buf = [0; Self::ENCODED_LEN];
27842        let mut buf = if avail_len < Self::ENCODED_LEN {
27843            payload_buf[0..avail_len].copy_from_slice(__input);
27844            Bytes::new(&payload_buf)
27845        } else {
27846            Bytes::new(__input)
27847        };
27848        let mut __struct = Self::default();
27849        __struct.baudrate = buf.get_u32_le();
27850        __struct.timeout = buf.get_u16_le();
27851        let tmp = buf.get_u8();
27852        __struct.device =
27853            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27854                enum_type: "SerialControlDev",
27855                value: tmp as u32,
27856            })?;
27857        let tmp = buf.get_u8();
27858        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
27859            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27860                flag_type: "SerialControlFlag",
27861                value: tmp as u32,
27862            })?;
27863        __struct.count = buf.get_u8();
27864        for v in &mut __struct.data {
27865            let val = buf.get_u8();
27866            *v = val;
27867        }
27868        __struct.target_system = buf.get_u8();
27869        __struct.target_component = buf.get_u8();
27870        Ok(__struct)
27871    }
27872    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27873        let mut __tmp = BytesMut::new(bytes);
27874        #[allow(clippy::absurd_extreme_comparisons)]
27875        #[allow(unused_comparisons)]
27876        if __tmp.remaining() < Self::ENCODED_LEN {
27877            panic!(
27878                "buffer is too small (need {} bytes, but got {})",
27879                Self::ENCODED_LEN,
27880                __tmp.remaining(),
27881            )
27882        }
27883        __tmp.put_u32_le(self.baudrate);
27884        __tmp.put_u16_le(self.timeout);
27885        __tmp.put_u8(self.device as u8);
27886        __tmp.put_u8(self.flags.bits());
27887        __tmp.put_u8(self.count);
27888        for val in &self.data {
27889            __tmp.put_u8(*val);
27890        }
27891        if matches!(version, MavlinkVersion::V2) {
27892            __tmp.put_u8(self.target_system);
27893            __tmp.put_u8(self.target_component);
27894            let len = __tmp.len();
27895            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27896        } else {
27897            __tmp.len()
27898        }
27899    }
27900}
27901#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27902#[doc = ""]
27903#[doc = "ID: 36"]
27904#[derive(Debug, Clone, PartialEq)]
27905#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27906#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27907#[cfg_attr(feature = "ts", derive(TS))]
27908#[cfg_attr(feature = "ts", ts(export))]
27909pub struct SERVO_OUTPUT_RAW_DATA {
27910    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27911    pub time_usec: u32,
27912    #[doc = "Servo output 1 value"]
27913    pub servo1_raw: u16,
27914    #[doc = "Servo output 2 value"]
27915    pub servo2_raw: u16,
27916    #[doc = "Servo output 3 value"]
27917    pub servo3_raw: u16,
27918    #[doc = "Servo output 4 value"]
27919    pub servo4_raw: u16,
27920    #[doc = "Servo output 5 value"]
27921    pub servo5_raw: u16,
27922    #[doc = "Servo output 6 value"]
27923    pub servo6_raw: u16,
27924    #[doc = "Servo output 7 value"]
27925    pub servo7_raw: u16,
27926    #[doc = "Servo output 8 value"]
27927    pub servo8_raw: u16,
27928    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27929    pub port: u8,
27930    #[doc = "Servo output 9 value"]
27931    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27932    pub servo9_raw: u16,
27933    #[doc = "Servo output 10 value"]
27934    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27935    pub servo10_raw: u16,
27936    #[doc = "Servo output 11 value"]
27937    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27938    pub servo11_raw: u16,
27939    #[doc = "Servo output 12 value"]
27940    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27941    pub servo12_raw: u16,
27942    #[doc = "Servo output 13 value"]
27943    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27944    pub servo13_raw: u16,
27945    #[doc = "Servo output 14 value"]
27946    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27947    pub servo14_raw: u16,
27948    #[doc = "Servo output 15 value"]
27949    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27950    pub servo15_raw: u16,
27951    #[doc = "Servo output 16 value"]
27952    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27953    pub servo16_raw: u16,
27954}
27955impl SERVO_OUTPUT_RAW_DATA {
27956    pub const ENCODED_LEN: usize = 37usize;
27957    pub const DEFAULT: Self = Self {
27958        time_usec: 0_u32,
27959        servo1_raw: 0_u16,
27960        servo2_raw: 0_u16,
27961        servo3_raw: 0_u16,
27962        servo4_raw: 0_u16,
27963        servo5_raw: 0_u16,
27964        servo6_raw: 0_u16,
27965        servo7_raw: 0_u16,
27966        servo8_raw: 0_u16,
27967        port: 0_u8,
27968        servo9_raw: 0_u16,
27969        servo10_raw: 0_u16,
27970        servo11_raw: 0_u16,
27971        servo12_raw: 0_u16,
27972        servo13_raw: 0_u16,
27973        servo14_raw: 0_u16,
27974        servo15_raw: 0_u16,
27975        servo16_raw: 0_u16,
27976    };
27977    #[cfg(feature = "arbitrary")]
27978    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27979        use arbitrary::{Arbitrary, Unstructured};
27980        let mut buf = [0u8; 1024];
27981        rng.fill_bytes(&mut buf);
27982        let mut unstructured = Unstructured::new(&buf);
27983        Self::arbitrary(&mut unstructured).unwrap_or_default()
27984    }
27985}
27986impl Default for SERVO_OUTPUT_RAW_DATA {
27987    fn default() -> Self {
27988        Self::DEFAULT.clone()
27989    }
27990}
27991impl MessageData for SERVO_OUTPUT_RAW_DATA {
27992    type Message = MavMessage;
27993    const ID: u32 = 36u32;
27994    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27995    const EXTRA_CRC: u8 = 222u8;
27996    const ENCODED_LEN: usize = 37usize;
27997    fn deser(
27998        _version: MavlinkVersion,
27999        __input: &[u8],
28000    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28001        let avail_len = __input.len();
28002        let mut payload_buf = [0; Self::ENCODED_LEN];
28003        let mut buf = if avail_len < Self::ENCODED_LEN {
28004            payload_buf[0..avail_len].copy_from_slice(__input);
28005            Bytes::new(&payload_buf)
28006        } else {
28007            Bytes::new(__input)
28008        };
28009        let mut __struct = Self::default();
28010        __struct.time_usec = buf.get_u32_le();
28011        __struct.servo1_raw = buf.get_u16_le();
28012        __struct.servo2_raw = buf.get_u16_le();
28013        __struct.servo3_raw = buf.get_u16_le();
28014        __struct.servo4_raw = buf.get_u16_le();
28015        __struct.servo5_raw = buf.get_u16_le();
28016        __struct.servo6_raw = buf.get_u16_le();
28017        __struct.servo7_raw = buf.get_u16_le();
28018        __struct.servo8_raw = buf.get_u16_le();
28019        __struct.port = buf.get_u8();
28020        __struct.servo9_raw = buf.get_u16_le();
28021        __struct.servo10_raw = buf.get_u16_le();
28022        __struct.servo11_raw = buf.get_u16_le();
28023        __struct.servo12_raw = buf.get_u16_le();
28024        __struct.servo13_raw = buf.get_u16_le();
28025        __struct.servo14_raw = buf.get_u16_le();
28026        __struct.servo15_raw = buf.get_u16_le();
28027        __struct.servo16_raw = buf.get_u16_le();
28028        Ok(__struct)
28029    }
28030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28031        let mut __tmp = BytesMut::new(bytes);
28032        #[allow(clippy::absurd_extreme_comparisons)]
28033        #[allow(unused_comparisons)]
28034        if __tmp.remaining() < Self::ENCODED_LEN {
28035            panic!(
28036                "buffer is too small (need {} bytes, but got {})",
28037                Self::ENCODED_LEN,
28038                __tmp.remaining(),
28039            )
28040        }
28041        __tmp.put_u32_le(self.time_usec);
28042        __tmp.put_u16_le(self.servo1_raw);
28043        __tmp.put_u16_le(self.servo2_raw);
28044        __tmp.put_u16_le(self.servo3_raw);
28045        __tmp.put_u16_le(self.servo4_raw);
28046        __tmp.put_u16_le(self.servo5_raw);
28047        __tmp.put_u16_le(self.servo6_raw);
28048        __tmp.put_u16_le(self.servo7_raw);
28049        __tmp.put_u16_le(self.servo8_raw);
28050        __tmp.put_u8(self.port);
28051        if matches!(version, MavlinkVersion::V2) {
28052            __tmp.put_u16_le(self.servo9_raw);
28053            __tmp.put_u16_le(self.servo10_raw);
28054            __tmp.put_u16_le(self.servo11_raw);
28055            __tmp.put_u16_le(self.servo12_raw);
28056            __tmp.put_u16_le(self.servo13_raw);
28057            __tmp.put_u16_le(self.servo14_raw);
28058            __tmp.put_u16_le(self.servo15_raw);
28059            __tmp.put_u16_le(self.servo16_raw);
28060            let len = __tmp.len();
28061            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28062        } else {
28063            __tmp.len()
28064        }
28065    }
28066}
28067#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
28068#[doc = ""]
28069#[doc = "ID: 256"]
28070#[derive(Debug, Clone, PartialEq)]
28071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28073#[cfg_attr(feature = "ts", derive(TS))]
28074#[cfg_attr(feature = "ts", ts(export))]
28075pub struct SETUP_SIGNING_DATA {
28076    #[doc = "initial timestamp"]
28077    pub initial_timestamp: u64,
28078    #[doc = "system id of the target"]
28079    pub target_system: u8,
28080    #[doc = "component ID of the target"]
28081    pub target_component: u8,
28082    #[doc = "signing key"]
28083    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28084    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28085    pub secret_key: [u8; 32],
28086}
28087impl SETUP_SIGNING_DATA {
28088    pub const ENCODED_LEN: usize = 42usize;
28089    pub const DEFAULT: Self = Self {
28090        initial_timestamp: 0_u64,
28091        target_system: 0_u8,
28092        target_component: 0_u8,
28093        secret_key: [0_u8; 32usize],
28094    };
28095    #[cfg(feature = "arbitrary")]
28096    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28097        use arbitrary::{Arbitrary, Unstructured};
28098        let mut buf = [0u8; 1024];
28099        rng.fill_bytes(&mut buf);
28100        let mut unstructured = Unstructured::new(&buf);
28101        Self::arbitrary(&mut unstructured).unwrap_or_default()
28102    }
28103}
28104impl Default for SETUP_SIGNING_DATA {
28105    fn default() -> Self {
28106        Self::DEFAULT.clone()
28107    }
28108}
28109impl MessageData for SETUP_SIGNING_DATA {
28110    type Message = MavMessage;
28111    const ID: u32 = 256u32;
28112    const NAME: &'static str = "SETUP_SIGNING";
28113    const EXTRA_CRC: u8 = 71u8;
28114    const ENCODED_LEN: usize = 42usize;
28115    fn deser(
28116        _version: MavlinkVersion,
28117        __input: &[u8],
28118    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28119        let avail_len = __input.len();
28120        let mut payload_buf = [0; Self::ENCODED_LEN];
28121        let mut buf = if avail_len < Self::ENCODED_LEN {
28122            payload_buf[0..avail_len].copy_from_slice(__input);
28123            Bytes::new(&payload_buf)
28124        } else {
28125            Bytes::new(__input)
28126        };
28127        let mut __struct = Self::default();
28128        __struct.initial_timestamp = buf.get_u64_le();
28129        __struct.target_system = buf.get_u8();
28130        __struct.target_component = buf.get_u8();
28131        for v in &mut __struct.secret_key {
28132            let val = buf.get_u8();
28133            *v = val;
28134        }
28135        Ok(__struct)
28136    }
28137    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28138        let mut __tmp = BytesMut::new(bytes);
28139        #[allow(clippy::absurd_extreme_comparisons)]
28140        #[allow(unused_comparisons)]
28141        if __tmp.remaining() < Self::ENCODED_LEN {
28142            panic!(
28143                "buffer is too small (need {} bytes, but got {})",
28144                Self::ENCODED_LEN,
28145                __tmp.remaining(),
28146            )
28147        }
28148        __tmp.put_u64_le(self.initial_timestamp);
28149        __tmp.put_u8(self.target_system);
28150        __tmp.put_u8(self.target_component);
28151        for val in &self.secret_key {
28152            __tmp.put_u8(*val);
28153        }
28154        if matches!(version, MavlinkVersion::V2) {
28155            let len = __tmp.len();
28156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28157        } else {
28158            __tmp.len()
28159        }
28160    }
28161}
28162#[doc = "Set the vehicle attitude and body angular rates."]
28163#[doc = ""]
28164#[doc = "ID: 139"]
28165#[derive(Debug, Clone, PartialEq)]
28166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28168#[cfg_attr(feature = "ts", derive(TS))]
28169#[cfg_attr(feature = "ts", ts(export))]
28170pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
28171    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28172    pub time_usec: u64,
28173    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
28174    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28175    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28176    pub controls: [f32; 8],
28177    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
28178    pub group_mlx: u8,
28179    #[doc = "System ID"]
28180    pub target_system: u8,
28181    #[doc = "Component ID"]
28182    pub target_component: u8,
28183}
28184impl SET_ACTUATOR_CONTROL_TARGET_DATA {
28185    pub const ENCODED_LEN: usize = 43usize;
28186    pub const DEFAULT: Self = Self {
28187        time_usec: 0_u64,
28188        controls: [0.0_f32; 8usize],
28189        group_mlx: 0_u8,
28190        target_system: 0_u8,
28191        target_component: 0_u8,
28192    };
28193    #[cfg(feature = "arbitrary")]
28194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28195        use arbitrary::{Arbitrary, Unstructured};
28196        let mut buf = [0u8; 1024];
28197        rng.fill_bytes(&mut buf);
28198        let mut unstructured = Unstructured::new(&buf);
28199        Self::arbitrary(&mut unstructured).unwrap_or_default()
28200    }
28201}
28202impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
28203    fn default() -> Self {
28204        Self::DEFAULT.clone()
28205    }
28206}
28207impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
28208    type Message = MavMessage;
28209    const ID: u32 = 139u32;
28210    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
28211    const EXTRA_CRC: u8 = 168u8;
28212    const ENCODED_LEN: usize = 43usize;
28213    fn deser(
28214        _version: MavlinkVersion,
28215        __input: &[u8],
28216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28217        let avail_len = __input.len();
28218        let mut payload_buf = [0; Self::ENCODED_LEN];
28219        let mut buf = if avail_len < Self::ENCODED_LEN {
28220            payload_buf[0..avail_len].copy_from_slice(__input);
28221            Bytes::new(&payload_buf)
28222        } else {
28223            Bytes::new(__input)
28224        };
28225        let mut __struct = Self::default();
28226        __struct.time_usec = buf.get_u64_le();
28227        for v in &mut __struct.controls {
28228            let val = buf.get_f32_le();
28229            *v = val;
28230        }
28231        __struct.group_mlx = buf.get_u8();
28232        __struct.target_system = buf.get_u8();
28233        __struct.target_component = buf.get_u8();
28234        Ok(__struct)
28235    }
28236    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28237        let mut __tmp = BytesMut::new(bytes);
28238        #[allow(clippy::absurd_extreme_comparisons)]
28239        #[allow(unused_comparisons)]
28240        if __tmp.remaining() < Self::ENCODED_LEN {
28241            panic!(
28242                "buffer is too small (need {} bytes, but got {})",
28243                Self::ENCODED_LEN,
28244                __tmp.remaining(),
28245            )
28246        }
28247        __tmp.put_u64_le(self.time_usec);
28248        for val in &self.controls {
28249            __tmp.put_f32_le(*val);
28250        }
28251        __tmp.put_u8(self.group_mlx);
28252        __tmp.put_u8(self.target_system);
28253        __tmp.put_u8(self.target_component);
28254        if matches!(version, MavlinkVersion::V2) {
28255            let len = __tmp.len();
28256            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28257        } else {
28258            __tmp.len()
28259        }
28260    }
28261}
28262#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
28263#[doc = ""]
28264#[doc = "ID: 82"]
28265#[derive(Debug, Clone, PartialEq)]
28266#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28268#[cfg_attr(feature = "ts", derive(TS))]
28269#[cfg_attr(feature = "ts", ts(export))]
28270pub struct SET_ATTITUDE_TARGET_DATA {
28271    #[doc = "Timestamp (time since system boot)."]
28272    pub time_boot_ms: u32,
28273    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
28274    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28275    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28276    pub q: [f32; 4],
28277    #[doc = "Body roll rate"]
28278    pub body_roll_rate: f32,
28279    #[doc = "Body pitch rate"]
28280    pub body_pitch_rate: f32,
28281    #[doc = "Body yaw rate"]
28282    pub body_yaw_rate: f32,
28283    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
28284    pub thrust: f32,
28285    #[doc = "System ID"]
28286    pub target_system: u8,
28287    #[doc = "Component ID"]
28288    pub target_component: u8,
28289    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28290    pub type_mask: AttitudeTargetTypemask,
28291    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
28292    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28293    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28294    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28295    pub thrust_body: [f32; 3],
28296}
28297impl SET_ATTITUDE_TARGET_DATA {
28298    pub const ENCODED_LEN: usize = 51usize;
28299    pub const DEFAULT: Self = Self {
28300        time_boot_ms: 0_u32,
28301        q: [0.0_f32; 4usize],
28302        body_roll_rate: 0.0_f32,
28303        body_pitch_rate: 0.0_f32,
28304        body_yaw_rate: 0.0_f32,
28305        thrust: 0.0_f32,
28306        target_system: 0_u8,
28307        target_component: 0_u8,
28308        type_mask: AttitudeTargetTypemask::DEFAULT,
28309        thrust_body: [0.0_f32; 3usize],
28310    };
28311    #[cfg(feature = "arbitrary")]
28312    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28313        use arbitrary::{Arbitrary, Unstructured};
28314        let mut buf = [0u8; 1024];
28315        rng.fill_bytes(&mut buf);
28316        let mut unstructured = Unstructured::new(&buf);
28317        Self::arbitrary(&mut unstructured).unwrap_or_default()
28318    }
28319}
28320impl Default for SET_ATTITUDE_TARGET_DATA {
28321    fn default() -> Self {
28322        Self::DEFAULT.clone()
28323    }
28324}
28325impl MessageData for SET_ATTITUDE_TARGET_DATA {
28326    type Message = MavMessage;
28327    const ID: u32 = 82u32;
28328    const NAME: &'static str = "SET_ATTITUDE_TARGET";
28329    const EXTRA_CRC: u8 = 49u8;
28330    const ENCODED_LEN: usize = 51usize;
28331    fn deser(
28332        _version: MavlinkVersion,
28333        __input: &[u8],
28334    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28335        let avail_len = __input.len();
28336        let mut payload_buf = [0; Self::ENCODED_LEN];
28337        let mut buf = if avail_len < Self::ENCODED_LEN {
28338            payload_buf[0..avail_len].copy_from_slice(__input);
28339            Bytes::new(&payload_buf)
28340        } else {
28341            Bytes::new(__input)
28342        };
28343        let mut __struct = Self::default();
28344        __struct.time_boot_ms = buf.get_u32_le();
28345        for v in &mut __struct.q {
28346            let val = buf.get_f32_le();
28347            *v = val;
28348        }
28349        __struct.body_roll_rate = buf.get_f32_le();
28350        __struct.body_pitch_rate = buf.get_f32_le();
28351        __struct.body_yaw_rate = buf.get_f32_le();
28352        __struct.thrust = buf.get_f32_le();
28353        __struct.target_system = buf.get_u8();
28354        __struct.target_component = buf.get_u8();
28355        let tmp = buf.get_u8();
28356        __struct.type_mask = AttitudeTargetTypemask::from_bits(
28357            tmp & AttitudeTargetTypemask::all().bits(),
28358        )
28359        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28360            flag_type: "AttitudeTargetTypemask",
28361            value: tmp as u32,
28362        })?;
28363        for v in &mut __struct.thrust_body {
28364            let val = buf.get_f32_le();
28365            *v = val;
28366        }
28367        Ok(__struct)
28368    }
28369    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28370        let mut __tmp = BytesMut::new(bytes);
28371        #[allow(clippy::absurd_extreme_comparisons)]
28372        #[allow(unused_comparisons)]
28373        if __tmp.remaining() < Self::ENCODED_LEN {
28374            panic!(
28375                "buffer is too small (need {} bytes, but got {})",
28376                Self::ENCODED_LEN,
28377                __tmp.remaining(),
28378            )
28379        }
28380        __tmp.put_u32_le(self.time_boot_ms);
28381        for val in &self.q {
28382            __tmp.put_f32_le(*val);
28383        }
28384        __tmp.put_f32_le(self.body_roll_rate);
28385        __tmp.put_f32_le(self.body_pitch_rate);
28386        __tmp.put_f32_le(self.body_yaw_rate);
28387        __tmp.put_f32_le(self.thrust);
28388        __tmp.put_u8(self.target_system);
28389        __tmp.put_u8(self.target_component);
28390        __tmp.put_u8(self.type_mask.bits());
28391        if matches!(version, MavlinkVersion::V2) {
28392            for val in &self.thrust_body {
28393                __tmp.put_f32_le(*val);
28394            }
28395            let len = __tmp.len();
28396            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28397        } else {
28398            __tmp.len()
28399        }
28400    }
28401}
28402#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28403#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28404#[doc = ""]
28405#[doc = "ID: 48"]
28406#[derive(Debug, Clone, PartialEq)]
28407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28409#[cfg_attr(feature = "ts", derive(TS))]
28410#[cfg_attr(feature = "ts", ts(export))]
28411pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28412    #[doc = "Latitude (WGS84)"]
28413    pub latitude: i32,
28414    #[doc = "Longitude (WGS84)"]
28415    pub longitude: i32,
28416    #[doc = "Altitude (MSL). Positive for up."]
28417    pub altitude: i32,
28418    #[doc = "System ID"]
28419    pub target_system: u8,
28420    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28421    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28422    pub time_usec: u64,
28423}
28424impl SET_GPS_GLOBAL_ORIGIN_DATA {
28425    pub const ENCODED_LEN: usize = 21usize;
28426    pub const DEFAULT: Self = Self {
28427        latitude: 0_i32,
28428        longitude: 0_i32,
28429        altitude: 0_i32,
28430        target_system: 0_u8,
28431        time_usec: 0_u64,
28432    };
28433    #[cfg(feature = "arbitrary")]
28434    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28435        use arbitrary::{Arbitrary, Unstructured};
28436        let mut buf = [0u8; 1024];
28437        rng.fill_bytes(&mut buf);
28438        let mut unstructured = Unstructured::new(&buf);
28439        Self::arbitrary(&mut unstructured).unwrap_or_default()
28440    }
28441}
28442impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28443    fn default() -> Self {
28444        Self::DEFAULT.clone()
28445    }
28446}
28447impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28448    type Message = MavMessage;
28449    const ID: u32 = 48u32;
28450    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28451    const EXTRA_CRC: u8 = 41u8;
28452    const ENCODED_LEN: usize = 21usize;
28453    fn deser(
28454        _version: MavlinkVersion,
28455        __input: &[u8],
28456    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28457        let avail_len = __input.len();
28458        let mut payload_buf = [0; Self::ENCODED_LEN];
28459        let mut buf = if avail_len < Self::ENCODED_LEN {
28460            payload_buf[0..avail_len].copy_from_slice(__input);
28461            Bytes::new(&payload_buf)
28462        } else {
28463            Bytes::new(__input)
28464        };
28465        let mut __struct = Self::default();
28466        __struct.latitude = buf.get_i32_le();
28467        __struct.longitude = buf.get_i32_le();
28468        __struct.altitude = buf.get_i32_le();
28469        __struct.target_system = buf.get_u8();
28470        __struct.time_usec = buf.get_u64_le();
28471        Ok(__struct)
28472    }
28473    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28474        let mut __tmp = BytesMut::new(bytes);
28475        #[allow(clippy::absurd_extreme_comparisons)]
28476        #[allow(unused_comparisons)]
28477        if __tmp.remaining() < Self::ENCODED_LEN {
28478            panic!(
28479                "buffer is too small (need {} bytes, but got {})",
28480                Self::ENCODED_LEN,
28481                __tmp.remaining(),
28482            )
28483        }
28484        __tmp.put_i32_le(self.latitude);
28485        __tmp.put_i32_le(self.longitude);
28486        __tmp.put_i32_le(self.altitude);
28487        __tmp.put_u8(self.target_system);
28488        if matches!(version, MavlinkVersion::V2) {
28489            __tmp.put_u64_le(self.time_usec);
28490            let len = __tmp.len();
28491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28492        } else {
28493            __tmp.len()
28494        }
28495    }
28496}
28497#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28498#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28499#[doc = ""]
28500#[doc = "ID: 243"]
28501#[derive(Debug, Clone, PartialEq)]
28502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28503#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28504#[cfg_attr(feature = "ts", derive(TS))]
28505#[cfg_attr(feature = "ts", ts(export))]
28506pub struct SET_HOME_POSITION_DATA {
28507    #[doc = "Latitude (WGS84)"]
28508    pub latitude: i32,
28509    #[doc = "Longitude (WGS84)"]
28510    pub longitude: i32,
28511    #[doc = "Altitude (MSL). Positive for up."]
28512    pub altitude: i32,
28513    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28514    pub x: f32,
28515    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28516    pub y: f32,
28517    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28518    pub z: f32,
28519    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28520    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28521    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28522    pub q: [f32; 4],
28523    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28524    pub approach_x: f32,
28525    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28526    pub approach_y: f32,
28527    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28528    pub approach_z: f32,
28529    #[doc = "System ID."]
28530    pub target_system: u8,
28531    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28532    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28533    pub time_usec: u64,
28534}
28535impl SET_HOME_POSITION_DATA {
28536    pub const ENCODED_LEN: usize = 61usize;
28537    pub const DEFAULT: Self = Self {
28538        latitude: 0_i32,
28539        longitude: 0_i32,
28540        altitude: 0_i32,
28541        x: 0.0_f32,
28542        y: 0.0_f32,
28543        z: 0.0_f32,
28544        q: [0.0_f32; 4usize],
28545        approach_x: 0.0_f32,
28546        approach_y: 0.0_f32,
28547        approach_z: 0.0_f32,
28548        target_system: 0_u8,
28549        time_usec: 0_u64,
28550    };
28551    #[cfg(feature = "arbitrary")]
28552    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28553        use arbitrary::{Arbitrary, Unstructured};
28554        let mut buf = [0u8; 1024];
28555        rng.fill_bytes(&mut buf);
28556        let mut unstructured = Unstructured::new(&buf);
28557        Self::arbitrary(&mut unstructured).unwrap_or_default()
28558    }
28559}
28560impl Default for SET_HOME_POSITION_DATA {
28561    fn default() -> Self {
28562        Self::DEFAULT.clone()
28563    }
28564}
28565impl MessageData for SET_HOME_POSITION_DATA {
28566    type Message = MavMessage;
28567    const ID: u32 = 243u32;
28568    const NAME: &'static str = "SET_HOME_POSITION";
28569    const EXTRA_CRC: u8 = 85u8;
28570    const ENCODED_LEN: usize = 61usize;
28571    fn deser(
28572        _version: MavlinkVersion,
28573        __input: &[u8],
28574    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28575        let avail_len = __input.len();
28576        let mut payload_buf = [0; Self::ENCODED_LEN];
28577        let mut buf = if avail_len < Self::ENCODED_LEN {
28578            payload_buf[0..avail_len].copy_from_slice(__input);
28579            Bytes::new(&payload_buf)
28580        } else {
28581            Bytes::new(__input)
28582        };
28583        let mut __struct = Self::default();
28584        __struct.latitude = buf.get_i32_le();
28585        __struct.longitude = buf.get_i32_le();
28586        __struct.altitude = buf.get_i32_le();
28587        __struct.x = buf.get_f32_le();
28588        __struct.y = buf.get_f32_le();
28589        __struct.z = buf.get_f32_le();
28590        for v in &mut __struct.q {
28591            let val = buf.get_f32_le();
28592            *v = val;
28593        }
28594        __struct.approach_x = buf.get_f32_le();
28595        __struct.approach_y = buf.get_f32_le();
28596        __struct.approach_z = buf.get_f32_le();
28597        __struct.target_system = buf.get_u8();
28598        __struct.time_usec = buf.get_u64_le();
28599        Ok(__struct)
28600    }
28601    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28602        let mut __tmp = BytesMut::new(bytes);
28603        #[allow(clippy::absurd_extreme_comparisons)]
28604        #[allow(unused_comparisons)]
28605        if __tmp.remaining() < Self::ENCODED_LEN {
28606            panic!(
28607                "buffer is too small (need {} bytes, but got {})",
28608                Self::ENCODED_LEN,
28609                __tmp.remaining(),
28610            )
28611        }
28612        __tmp.put_i32_le(self.latitude);
28613        __tmp.put_i32_le(self.longitude);
28614        __tmp.put_i32_le(self.altitude);
28615        __tmp.put_f32_le(self.x);
28616        __tmp.put_f32_le(self.y);
28617        __tmp.put_f32_le(self.z);
28618        for val in &self.q {
28619            __tmp.put_f32_le(*val);
28620        }
28621        __tmp.put_f32_le(self.approach_x);
28622        __tmp.put_f32_le(self.approach_y);
28623        __tmp.put_f32_le(self.approach_z);
28624        __tmp.put_u8(self.target_system);
28625        if matches!(version, MavlinkVersion::V2) {
28626            __tmp.put_u64_le(self.time_usec);
28627            let len = __tmp.len();
28628            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28629        } else {
28630            __tmp.len()
28631        }
28632    }
28633}
28634#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28635#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28636#[doc = ""]
28637#[doc = "ID: 11"]
28638#[derive(Debug, Clone, PartialEq)]
28639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28641#[cfg_attr(feature = "ts", derive(TS))]
28642#[cfg_attr(feature = "ts", ts(export))]
28643pub struct SET_MODE_DATA {
28644    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28645    pub custom_mode: u32,
28646    #[doc = "The system setting the mode"]
28647    pub target_system: u8,
28648    #[doc = "The new base mode."]
28649    pub base_mode: MavMode,
28650}
28651impl SET_MODE_DATA {
28652    pub const ENCODED_LEN: usize = 6usize;
28653    pub const DEFAULT: Self = Self {
28654        custom_mode: 0_u32,
28655        target_system: 0_u8,
28656        base_mode: MavMode::DEFAULT,
28657    };
28658    #[cfg(feature = "arbitrary")]
28659    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28660        use arbitrary::{Arbitrary, Unstructured};
28661        let mut buf = [0u8; 1024];
28662        rng.fill_bytes(&mut buf);
28663        let mut unstructured = Unstructured::new(&buf);
28664        Self::arbitrary(&mut unstructured).unwrap_or_default()
28665    }
28666}
28667impl Default for SET_MODE_DATA {
28668    fn default() -> Self {
28669        Self::DEFAULT.clone()
28670    }
28671}
28672impl MessageData for SET_MODE_DATA {
28673    type Message = MavMessage;
28674    const ID: u32 = 11u32;
28675    const NAME: &'static str = "SET_MODE";
28676    const EXTRA_CRC: u8 = 89u8;
28677    const ENCODED_LEN: usize = 6usize;
28678    fn deser(
28679        _version: MavlinkVersion,
28680        __input: &[u8],
28681    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28682        let avail_len = __input.len();
28683        let mut payload_buf = [0; Self::ENCODED_LEN];
28684        let mut buf = if avail_len < Self::ENCODED_LEN {
28685            payload_buf[0..avail_len].copy_from_slice(__input);
28686            Bytes::new(&payload_buf)
28687        } else {
28688            Bytes::new(__input)
28689        };
28690        let mut __struct = Self::default();
28691        __struct.custom_mode = buf.get_u32_le();
28692        __struct.target_system = buf.get_u8();
28693        let tmp = buf.get_u8();
28694        __struct.base_mode =
28695            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28696                enum_type: "MavMode",
28697                value: tmp as u32,
28698            })?;
28699        Ok(__struct)
28700    }
28701    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28702        let mut __tmp = BytesMut::new(bytes);
28703        #[allow(clippy::absurd_extreme_comparisons)]
28704        #[allow(unused_comparisons)]
28705        if __tmp.remaining() < Self::ENCODED_LEN {
28706            panic!(
28707                "buffer is too small (need {} bytes, but got {})",
28708                Self::ENCODED_LEN,
28709                __tmp.remaining(),
28710            )
28711        }
28712        __tmp.put_u32_le(self.custom_mode);
28713        __tmp.put_u8(self.target_system);
28714        __tmp.put_u8(self.base_mode as u8);
28715        if matches!(version, MavlinkVersion::V2) {
28716            let len = __tmp.len();
28717            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28718        } else {
28719            __tmp.len()
28720        }
28721    }
28722}
28723#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28724#[doc = ""]
28725#[doc = "ID: 86"]
28726#[derive(Debug, Clone, PartialEq)]
28727#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28728#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28729#[cfg_attr(feature = "ts", derive(TS))]
28730#[cfg_attr(feature = "ts", ts(export))]
28731pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28732    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28733    pub time_boot_ms: u32,
28734    #[doc = "Latitude in WGS84 frame"]
28735    pub lat_int: i32,
28736    #[doc = "Longitude in WGS84 frame"]
28737    pub lon_int: i32,
28738    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28739    pub alt: f32,
28740    #[doc = "X velocity in NED frame"]
28741    pub vx: f32,
28742    #[doc = "Y velocity in NED frame"]
28743    pub vy: f32,
28744    #[doc = "Z velocity in NED frame"]
28745    pub vz: f32,
28746    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28747    pub afx: f32,
28748    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28749    pub afy: f32,
28750    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28751    pub afz: f32,
28752    #[doc = "yaw setpoint"]
28753    pub yaw: f32,
28754    #[doc = "yaw rate setpoint"]
28755    pub yaw_rate: f32,
28756    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28757    pub type_mask: PositionTargetTypemask,
28758    #[doc = "System ID"]
28759    pub target_system: u8,
28760    #[doc = "Component ID"]
28761    pub target_component: u8,
28762    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28763    pub coordinate_frame: MavFrame,
28764}
28765impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28766    pub const ENCODED_LEN: usize = 53usize;
28767    pub const DEFAULT: Self = Self {
28768        time_boot_ms: 0_u32,
28769        lat_int: 0_i32,
28770        lon_int: 0_i32,
28771        alt: 0.0_f32,
28772        vx: 0.0_f32,
28773        vy: 0.0_f32,
28774        vz: 0.0_f32,
28775        afx: 0.0_f32,
28776        afy: 0.0_f32,
28777        afz: 0.0_f32,
28778        yaw: 0.0_f32,
28779        yaw_rate: 0.0_f32,
28780        type_mask: PositionTargetTypemask::DEFAULT,
28781        target_system: 0_u8,
28782        target_component: 0_u8,
28783        coordinate_frame: MavFrame::DEFAULT,
28784    };
28785    #[cfg(feature = "arbitrary")]
28786    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28787        use arbitrary::{Arbitrary, Unstructured};
28788        let mut buf = [0u8; 1024];
28789        rng.fill_bytes(&mut buf);
28790        let mut unstructured = Unstructured::new(&buf);
28791        Self::arbitrary(&mut unstructured).unwrap_or_default()
28792    }
28793}
28794impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28795    fn default() -> Self {
28796        Self::DEFAULT.clone()
28797    }
28798}
28799impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28800    type Message = MavMessage;
28801    const ID: u32 = 86u32;
28802    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28803    const EXTRA_CRC: u8 = 5u8;
28804    const ENCODED_LEN: usize = 53usize;
28805    fn deser(
28806        _version: MavlinkVersion,
28807        __input: &[u8],
28808    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28809        let avail_len = __input.len();
28810        let mut payload_buf = [0; Self::ENCODED_LEN];
28811        let mut buf = if avail_len < Self::ENCODED_LEN {
28812            payload_buf[0..avail_len].copy_from_slice(__input);
28813            Bytes::new(&payload_buf)
28814        } else {
28815            Bytes::new(__input)
28816        };
28817        let mut __struct = Self::default();
28818        __struct.time_boot_ms = buf.get_u32_le();
28819        __struct.lat_int = buf.get_i32_le();
28820        __struct.lon_int = buf.get_i32_le();
28821        __struct.alt = buf.get_f32_le();
28822        __struct.vx = buf.get_f32_le();
28823        __struct.vy = buf.get_f32_le();
28824        __struct.vz = buf.get_f32_le();
28825        __struct.afx = buf.get_f32_le();
28826        __struct.afy = buf.get_f32_le();
28827        __struct.afz = buf.get_f32_le();
28828        __struct.yaw = buf.get_f32_le();
28829        __struct.yaw_rate = buf.get_f32_le();
28830        let tmp = buf.get_u16_le();
28831        __struct.type_mask = PositionTargetTypemask::from_bits(
28832            tmp & PositionTargetTypemask::all().bits(),
28833        )
28834        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28835            flag_type: "PositionTargetTypemask",
28836            value: tmp as u32,
28837        })?;
28838        __struct.target_system = buf.get_u8();
28839        __struct.target_component = buf.get_u8();
28840        let tmp = buf.get_u8();
28841        __struct.coordinate_frame =
28842            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28843                enum_type: "MavFrame",
28844                value: tmp as u32,
28845            })?;
28846        Ok(__struct)
28847    }
28848    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28849        let mut __tmp = BytesMut::new(bytes);
28850        #[allow(clippy::absurd_extreme_comparisons)]
28851        #[allow(unused_comparisons)]
28852        if __tmp.remaining() < Self::ENCODED_LEN {
28853            panic!(
28854                "buffer is too small (need {} bytes, but got {})",
28855                Self::ENCODED_LEN,
28856                __tmp.remaining(),
28857            )
28858        }
28859        __tmp.put_u32_le(self.time_boot_ms);
28860        __tmp.put_i32_le(self.lat_int);
28861        __tmp.put_i32_le(self.lon_int);
28862        __tmp.put_f32_le(self.alt);
28863        __tmp.put_f32_le(self.vx);
28864        __tmp.put_f32_le(self.vy);
28865        __tmp.put_f32_le(self.vz);
28866        __tmp.put_f32_le(self.afx);
28867        __tmp.put_f32_le(self.afy);
28868        __tmp.put_f32_le(self.afz);
28869        __tmp.put_f32_le(self.yaw);
28870        __tmp.put_f32_le(self.yaw_rate);
28871        __tmp.put_u16_le(self.type_mask.bits());
28872        __tmp.put_u8(self.target_system);
28873        __tmp.put_u8(self.target_component);
28874        __tmp.put_u8(self.coordinate_frame as u8);
28875        if matches!(version, MavlinkVersion::V2) {
28876            let len = __tmp.len();
28877            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28878        } else {
28879            __tmp.len()
28880        }
28881    }
28882}
28883#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28884#[doc = ""]
28885#[doc = "ID: 84"]
28886#[derive(Debug, Clone, PartialEq)]
28887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28888#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28889#[cfg_attr(feature = "ts", derive(TS))]
28890#[cfg_attr(feature = "ts", ts(export))]
28891pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28892    #[doc = "Timestamp (time since system boot)."]
28893    pub time_boot_ms: u32,
28894    #[doc = "X Position in NED frame"]
28895    pub x: f32,
28896    #[doc = "Y Position in NED frame"]
28897    pub y: f32,
28898    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28899    pub z: f32,
28900    #[doc = "X velocity in NED frame"]
28901    pub vx: f32,
28902    #[doc = "Y velocity in NED frame"]
28903    pub vy: f32,
28904    #[doc = "Z velocity in NED frame"]
28905    pub vz: f32,
28906    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28907    pub afx: f32,
28908    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28909    pub afy: f32,
28910    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28911    pub afz: f32,
28912    #[doc = "yaw setpoint"]
28913    pub yaw: f32,
28914    #[doc = "yaw rate setpoint"]
28915    pub yaw_rate: f32,
28916    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28917    pub type_mask: PositionTargetTypemask,
28918    #[doc = "System ID"]
28919    pub target_system: u8,
28920    #[doc = "Component ID"]
28921    pub target_component: u8,
28922    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28923    pub coordinate_frame: MavFrame,
28924}
28925impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28926    pub const ENCODED_LEN: usize = 53usize;
28927    pub const DEFAULT: Self = Self {
28928        time_boot_ms: 0_u32,
28929        x: 0.0_f32,
28930        y: 0.0_f32,
28931        z: 0.0_f32,
28932        vx: 0.0_f32,
28933        vy: 0.0_f32,
28934        vz: 0.0_f32,
28935        afx: 0.0_f32,
28936        afy: 0.0_f32,
28937        afz: 0.0_f32,
28938        yaw: 0.0_f32,
28939        yaw_rate: 0.0_f32,
28940        type_mask: PositionTargetTypemask::DEFAULT,
28941        target_system: 0_u8,
28942        target_component: 0_u8,
28943        coordinate_frame: MavFrame::DEFAULT,
28944    };
28945    #[cfg(feature = "arbitrary")]
28946    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28947        use arbitrary::{Arbitrary, Unstructured};
28948        let mut buf = [0u8; 1024];
28949        rng.fill_bytes(&mut buf);
28950        let mut unstructured = Unstructured::new(&buf);
28951        Self::arbitrary(&mut unstructured).unwrap_or_default()
28952    }
28953}
28954impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28955    fn default() -> Self {
28956        Self::DEFAULT.clone()
28957    }
28958}
28959impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28960    type Message = MavMessage;
28961    const ID: u32 = 84u32;
28962    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28963    const EXTRA_CRC: u8 = 143u8;
28964    const ENCODED_LEN: usize = 53usize;
28965    fn deser(
28966        _version: MavlinkVersion,
28967        __input: &[u8],
28968    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28969        let avail_len = __input.len();
28970        let mut payload_buf = [0; Self::ENCODED_LEN];
28971        let mut buf = if avail_len < Self::ENCODED_LEN {
28972            payload_buf[0..avail_len].copy_from_slice(__input);
28973            Bytes::new(&payload_buf)
28974        } else {
28975            Bytes::new(__input)
28976        };
28977        let mut __struct = Self::default();
28978        __struct.time_boot_ms = buf.get_u32_le();
28979        __struct.x = buf.get_f32_le();
28980        __struct.y = buf.get_f32_le();
28981        __struct.z = buf.get_f32_le();
28982        __struct.vx = buf.get_f32_le();
28983        __struct.vy = buf.get_f32_le();
28984        __struct.vz = buf.get_f32_le();
28985        __struct.afx = buf.get_f32_le();
28986        __struct.afy = buf.get_f32_le();
28987        __struct.afz = buf.get_f32_le();
28988        __struct.yaw = buf.get_f32_le();
28989        __struct.yaw_rate = buf.get_f32_le();
28990        let tmp = buf.get_u16_le();
28991        __struct.type_mask = PositionTargetTypemask::from_bits(
28992            tmp & PositionTargetTypemask::all().bits(),
28993        )
28994        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28995            flag_type: "PositionTargetTypemask",
28996            value: tmp as u32,
28997        })?;
28998        __struct.target_system = buf.get_u8();
28999        __struct.target_component = buf.get_u8();
29000        let tmp = buf.get_u8();
29001        __struct.coordinate_frame =
29002            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29003                enum_type: "MavFrame",
29004                value: tmp as u32,
29005            })?;
29006        Ok(__struct)
29007    }
29008    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29009        let mut __tmp = BytesMut::new(bytes);
29010        #[allow(clippy::absurd_extreme_comparisons)]
29011        #[allow(unused_comparisons)]
29012        if __tmp.remaining() < Self::ENCODED_LEN {
29013            panic!(
29014                "buffer is too small (need {} bytes, but got {})",
29015                Self::ENCODED_LEN,
29016                __tmp.remaining(),
29017            )
29018        }
29019        __tmp.put_u32_le(self.time_boot_ms);
29020        __tmp.put_f32_le(self.x);
29021        __tmp.put_f32_le(self.y);
29022        __tmp.put_f32_le(self.z);
29023        __tmp.put_f32_le(self.vx);
29024        __tmp.put_f32_le(self.vy);
29025        __tmp.put_f32_le(self.vz);
29026        __tmp.put_f32_le(self.afx);
29027        __tmp.put_f32_le(self.afy);
29028        __tmp.put_f32_le(self.afz);
29029        __tmp.put_f32_le(self.yaw);
29030        __tmp.put_f32_le(self.yaw_rate);
29031        __tmp.put_u16_le(self.type_mask.bits());
29032        __tmp.put_u8(self.target_system);
29033        __tmp.put_u8(self.target_component);
29034        __tmp.put_u8(self.coordinate_frame as u8);
29035        if matches!(version, MavlinkVersion::V2) {
29036            let len = __tmp.len();
29037            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29038        } else {
29039            __tmp.len()
29040        }
29041    }
29042}
29043#[doc = "Status of simulation environment, if used."]
29044#[doc = ""]
29045#[doc = "ID: 108"]
29046#[derive(Debug, Clone, PartialEq)]
29047#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29048#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29049#[cfg_attr(feature = "ts", derive(TS))]
29050#[cfg_attr(feature = "ts", ts(export))]
29051pub struct SIM_STATE_DATA {
29052    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
29053    pub q1: f32,
29054    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
29055    pub q2: f32,
29056    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
29057    pub q3: f32,
29058    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
29059    pub q4: f32,
29060    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
29061    pub roll: f32,
29062    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
29063    pub pitch: f32,
29064    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
29065    pub yaw: f32,
29066    #[doc = "X acceleration"]
29067    pub xacc: f32,
29068    #[doc = "Y acceleration"]
29069    pub yacc: f32,
29070    #[doc = "Z acceleration"]
29071    pub zacc: f32,
29072    #[doc = "Angular speed around X axis"]
29073    pub xgyro: f32,
29074    #[doc = "Angular speed around Y axis"]
29075    pub ygyro: f32,
29076    #[doc = "Angular speed around Z axis"]
29077    pub zgyro: f32,
29078    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
29079    pub lat: f32,
29080    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
29081    pub lon: f32,
29082    #[doc = "Altitude"]
29083    pub alt: f32,
29084    #[doc = "Horizontal position standard deviation"]
29085    pub std_dev_horz: f32,
29086    #[doc = "Vertical position standard deviation"]
29087    pub std_dev_vert: f32,
29088    #[doc = "True velocity in north direction in earth-fixed NED frame"]
29089    pub vn: f32,
29090    #[doc = "True velocity in east direction in earth-fixed NED frame"]
29091    pub ve: f32,
29092    #[doc = "True velocity in down direction in earth-fixed NED frame"]
29093    pub vd: f32,
29094    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
29095    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29096    pub lat_int: i32,
29097    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
29098    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29099    pub lon_int: i32,
29100}
29101impl SIM_STATE_DATA {
29102    pub const ENCODED_LEN: usize = 92usize;
29103    pub const DEFAULT: Self = Self {
29104        q1: 0.0_f32,
29105        q2: 0.0_f32,
29106        q3: 0.0_f32,
29107        q4: 0.0_f32,
29108        roll: 0.0_f32,
29109        pitch: 0.0_f32,
29110        yaw: 0.0_f32,
29111        xacc: 0.0_f32,
29112        yacc: 0.0_f32,
29113        zacc: 0.0_f32,
29114        xgyro: 0.0_f32,
29115        ygyro: 0.0_f32,
29116        zgyro: 0.0_f32,
29117        lat: 0.0_f32,
29118        lon: 0.0_f32,
29119        alt: 0.0_f32,
29120        std_dev_horz: 0.0_f32,
29121        std_dev_vert: 0.0_f32,
29122        vn: 0.0_f32,
29123        ve: 0.0_f32,
29124        vd: 0.0_f32,
29125        lat_int: 0_i32,
29126        lon_int: 0_i32,
29127    };
29128    #[cfg(feature = "arbitrary")]
29129    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29130        use arbitrary::{Arbitrary, Unstructured};
29131        let mut buf = [0u8; 1024];
29132        rng.fill_bytes(&mut buf);
29133        let mut unstructured = Unstructured::new(&buf);
29134        Self::arbitrary(&mut unstructured).unwrap_or_default()
29135    }
29136}
29137impl Default for SIM_STATE_DATA {
29138    fn default() -> Self {
29139        Self::DEFAULT.clone()
29140    }
29141}
29142impl MessageData for SIM_STATE_DATA {
29143    type Message = MavMessage;
29144    const ID: u32 = 108u32;
29145    const NAME: &'static str = "SIM_STATE";
29146    const EXTRA_CRC: u8 = 32u8;
29147    const ENCODED_LEN: usize = 92usize;
29148    fn deser(
29149        _version: MavlinkVersion,
29150        __input: &[u8],
29151    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29152        let avail_len = __input.len();
29153        let mut payload_buf = [0; Self::ENCODED_LEN];
29154        let mut buf = if avail_len < Self::ENCODED_LEN {
29155            payload_buf[0..avail_len].copy_from_slice(__input);
29156            Bytes::new(&payload_buf)
29157        } else {
29158            Bytes::new(__input)
29159        };
29160        let mut __struct = Self::default();
29161        __struct.q1 = buf.get_f32_le();
29162        __struct.q2 = buf.get_f32_le();
29163        __struct.q3 = buf.get_f32_le();
29164        __struct.q4 = buf.get_f32_le();
29165        __struct.roll = buf.get_f32_le();
29166        __struct.pitch = buf.get_f32_le();
29167        __struct.yaw = buf.get_f32_le();
29168        __struct.xacc = buf.get_f32_le();
29169        __struct.yacc = buf.get_f32_le();
29170        __struct.zacc = buf.get_f32_le();
29171        __struct.xgyro = buf.get_f32_le();
29172        __struct.ygyro = buf.get_f32_le();
29173        __struct.zgyro = buf.get_f32_le();
29174        __struct.lat = buf.get_f32_le();
29175        __struct.lon = buf.get_f32_le();
29176        __struct.alt = buf.get_f32_le();
29177        __struct.std_dev_horz = buf.get_f32_le();
29178        __struct.std_dev_vert = buf.get_f32_le();
29179        __struct.vn = buf.get_f32_le();
29180        __struct.ve = buf.get_f32_le();
29181        __struct.vd = buf.get_f32_le();
29182        __struct.lat_int = buf.get_i32_le();
29183        __struct.lon_int = buf.get_i32_le();
29184        Ok(__struct)
29185    }
29186    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29187        let mut __tmp = BytesMut::new(bytes);
29188        #[allow(clippy::absurd_extreme_comparisons)]
29189        #[allow(unused_comparisons)]
29190        if __tmp.remaining() < Self::ENCODED_LEN {
29191            panic!(
29192                "buffer is too small (need {} bytes, but got {})",
29193                Self::ENCODED_LEN,
29194                __tmp.remaining(),
29195            )
29196        }
29197        __tmp.put_f32_le(self.q1);
29198        __tmp.put_f32_le(self.q2);
29199        __tmp.put_f32_le(self.q3);
29200        __tmp.put_f32_le(self.q4);
29201        __tmp.put_f32_le(self.roll);
29202        __tmp.put_f32_le(self.pitch);
29203        __tmp.put_f32_le(self.yaw);
29204        __tmp.put_f32_le(self.xacc);
29205        __tmp.put_f32_le(self.yacc);
29206        __tmp.put_f32_le(self.zacc);
29207        __tmp.put_f32_le(self.xgyro);
29208        __tmp.put_f32_le(self.ygyro);
29209        __tmp.put_f32_le(self.zgyro);
29210        __tmp.put_f32_le(self.lat);
29211        __tmp.put_f32_le(self.lon);
29212        __tmp.put_f32_le(self.alt);
29213        __tmp.put_f32_le(self.std_dev_horz);
29214        __tmp.put_f32_le(self.std_dev_vert);
29215        __tmp.put_f32_le(self.vn);
29216        __tmp.put_f32_le(self.ve);
29217        __tmp.put_f32_le(self.vd);
29218        if matches!(version, MavlinkVersion::V2) {
29219            __tmp.put_i32_le(self.lat_int);
29220            __tmp.put_i32_le(self.lon_int);
29221            let len = __tmp.len();
29222            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29223        } else {
29224            __tmp.len()
29225        }
29226    }
29227}
29228#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
29229#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
29230#[doc = ""]
29231#[doc = "ID: 370"]
29232#[derive(Debug, Clone, PartialEq)]
29233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29235#[cfg_attr(feature = "ts", derive(TS))]
29236#[cfg_attr(feature = "ts", ts(export))]
29237pub struct SMART_BATTERY_INFO_DATA {
29238    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
29239    pub capacity_full_specification: i32,
29240    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
29241    pub capacity_full: i32,
29242    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
29243    pub cycle_count: u16,
29244    #[doc = "Battery weight. 0: field not provided."]
29245    pub weight: u16,
29246    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
29247    pub discharge_minimum_voltage: u16,
29248    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
29249    pub charging_minimum_voltage: u16,
29250    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
29251    pub resting_minimum_voltage: u16,
29252    #[doc = "Battery ID"]
29253    pub id: u8,
29254    #[doc = "Function of the battery"]
29255    pub battery_function: MavBatteryFunction,
29256    #[doc = "Type (chemistry) of the battery"]
29257    pub mavtype: MavBatteryType,
29258    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
29259    #[cfg_attr(
29260        feature = "serde",
29261        serde(
29262            serialize_with = "crate::nulstr::serialize::<_, 16>",
29263            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
29264        )
29265    )]
29266    #[cfg_attr(feature = "ts", ts(type = "string"))]
29267    pub serial_number: [u8; 16],
29268    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
29269    #[cfg_attr(
29270        feature = "serde",
29271        serde(
29272            serialize_with = "crate::nulstr::serialize::<_, 50>",
29273            deserialize_with = "crate::nulstr::deserialize::<_, 50>"
29274        )
29275    )]
29276    #[cfg_attr(feature = "ts", ts(type = "string"))]
29277    pub device_name: [u8; 50],
29278    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
29279    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29280    pub charging_maximum_voltage: u16,
29281    #[doc = "Number of battery cells in series. 0: field not provided."]
29282    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29283    pub cells_in_series: u8,
29284    #[doc = "Maximum pack discharge current. 0: field not provided."]
29285    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29286    pub discharge_maximum_current: u32,
29287    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
29288    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29289    pub discharge_maximum_burst_current: u32,
29290    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
29291    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29292    #[cfg_attr(
29293        feature = "serde",
29294        serde(
29295            serialize_with = "crate::nulstr::serialize::<_, 11>",
29296            deserialize_with = "crate::nulstr::deserialize::<_, 11>"
29297        )
29298    )]
29299    #[cfg_attr(feature = "ts", ts(type = "string"))]
29300    pub manufacture_date: [u8; 11],
29301}
29302impl SMART_BATTERY_INFO_DATA {
29303    pub const ENCODED_LEN: usize = 109usize;
29304    pub const DEFAULT: Self = Self {
29305        capacity_full_specification: 0_i32,
29306        capacity_full: 0_i32,
29307        cycle_count: 0_u16,
29308        weight: 0_u16,
29309        discharge_minimum_voltage: 0_u16,
29310        charging_minimum_voltage: 0_u16,
29311        resting_minimum_voltage: 0_u16,
29312        id: 0_u8,
29313        battery_function: MavBatteryFunction::DEFAULT,
29314        mavtype: MavBatteryType::DEFAULT,
29315        serial_number: [0_u8; 16usize],
29316        device_name: [0_u8; 50usize],
29317        charging_maximum_voltage: 0_u16,
29318        cells_in_series: 0_u8,
29319        discharge_maximum_current: 0_u32,
29320        discharge_maximum_burst_current: 0_u32,
29321        manufacture_date: [0_u8; 11usize],
29322    };
29323    #[cfg(feature = "arbitrary")]
29324    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29325        use arbitrary::{Arbitrary, Unstructured};
29326        let mut buf = [0u8; 1024];
29327        rng.fill_bytes(&mut buf);
29328        let mut unstructured = Unstructured::new(&buf);
29329        Self::arbitrary(&mut unstructured).unwrap_or_default()
29330    }
29331}
29332impl Default for SMART_BATTERY_INFO_DATA {
29333    fn default() -> Self {
29334        Self::DEFAULT.clone()
29335    }
29336}
29337impl MessageData for SMART_BATTERY_INFO_DATA {
29338    type Message = MavMessage;
29339    const ID: u32 = 370u32;
29340    const NAME: &'static str = "SMART_BATTERY_INFO";
29341    const EXTRA_CRC: u8 = 75u8;
29342    const ENCODED_LEN: usize = 109usize;
29343    fn deser(
29344        _version: MavlinkVersion,
29345        __input: &[u8],
29346    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29347        let avail_len = __input.len();
29348        let mut payload_buf = [0; Self::ENCODED_LEN];
29349        let mut buf = if avail_len < Self::ENCODED_LEN {
29350            payload_buf[0..avail_len].copy_from_slice(__input);
29351            Bytes::new(&payload_buf)
29352        } else {
29353            Bytes::new(__input)
29354        };
29355        let mut __struct = Self::default();
29356        __struct.capacity_full_specification = buf.get_i32_le();
29357        __struct.capacity_full = buf.get_i32_le();
29358        __struct.cycle_count = buf.get_u16_le();
29359        __struct.weight = buf.get_u16_le();
29360        __struct.discharge_minimum_voltage = buf.get_u16_le();
29361        __struct.charging_minimum_voltage = buf.get_u16_le();
29362        __struct.resting_minimum_voltage = buf.get_u16_le();
29363        __struct.id = buf.get_u8();
29364        let tmp = buf.get_u8();
29365        __struct.battery_function =
29366            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29367                enum_type: "MavBatteryFunction",
29368                value: tmp as u32,
29369            })?;
29370        let tmp = buf.get_u8();
29371        __struct.mavtype =
29372            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29373                enum_type: "MavBatteryType",
29374                value: tmp as u32,
29375            })?;
29376        for v in &mut __struct.serial_number {
29377            let val = buf.get_u8();
29378            *v = val;
29379        }
29380        for v in &mut __struct.device_name {
29381            let val = buf.get_u8();
29382            *v = val;
29383        }
29384        __struct.charging_maximum_voltage = buf.get_u16_le();
29385        __struct.cells_in_series = buf.get_u8();
29386        __struct.discharge_maximum_current = buf.get_u32_le();
29387        __struct.discharge_maximum_burst_current = buf.get_u32_le();
29388        for v in &mut __struct.manufacture_date {
29389            let val = buf.get_u8();
29390            *v = val;
29391        }
29392        Ok(__struct)
29393    }
29394    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29395        let mut __tmp = BytesMut::new(bytes);
29396        #[allow(clippy::absurd_extreme_comparisons)]
29397        #[allow(unused_comparisons)]
29398        if __tmp.remaining() < Self::ENCODED_LEN {
29399            panic!(
29400                "buffer is too small (need {} bytes, but got {})",
29401                Self::ENCODED_LEN,
29402                __tmp.remaining(),
29403            )
29404        }
29405        __tmp.put_i32_le(self.capacity_full_specification);
29406        __tmp.put_i32_le(self.capacity_full);
29407        __tmp.put_u16_le(self.cycle_count);
29408        __tmp.put_u16_le(self.weight);
29409        __tmp.put_u16_le(self.discharge_minimum_voltage);
29410        __tmp.put_u16_le(self.charging_minimum_voltage);
29411        __tmp.put_u16_le(self.resting_minimum_voltage);
29412        __tmp.put_u8(self.id);
29413        __tmp.put_u8(self.battery_function as u8);
29414        __tmp.put_u8(self.mavtype as u8);
29415        for val in &self.serial_number {
29416            __tmp.put_u8(*val);
29417        }
29418        for val in &self.device_name {
29419            __tmp.put_u8(*val);
29420        }
29421        if matches!(version, MavlinkVersion::V2) {
29422            __tmp.put_u16_le(self.charging_maximum_voltage);
29423            __tmp.put_u8(self.cells_in_series);
29424            __tmp.put_u32_le(self.discharge_maximum_current);
29425            __tmp.put_u32_le(self.discharge_maximum_burst_current);
29426            for val in &self.manufacture_date {
29427                __tmp.put_u8(*val);
29428            }
29429            let len = __tmp.len();
29430            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29431        } else {
29432            __tmp.len()
29433        }
29434    }
29435}
29436#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
29437#[doc = ""]
29438#[doc = "ID: 253"]
29439#[derive(Debug, Clone, PartialEq)]
29440#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29442#[cfg_attr(feature = "ts", derive(TS))]
29443#[cfg_attr(feature = "ts", ts(export))]
29444pub struct STATUSTEXT_DATA {
29445    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
29446    pub severity: MavSeverity,
29447    #[doc = "Status text message, without null termination character"]
29448    #[cfg_attr(
29449        feature = "serde",
29450        serde(
29451            serialize_with = "crate::nulstr::serialize::<_, 50>",
29452            deserialize_with = "crate::nulstr::deserialize::<_, 50>"
29453        )
29454    )]
29455    #[cfg_attr(feature = "ts", ts(type = "string"))]
29456    pub text: [u8; 50],
29457    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
29458    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29459    pub id: u16,
29460    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
29461    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29462    pub chunk_seq: u8,
29463}
29464impl STATUSTEXT_DATA {
29465    pub const ENCODED_LEN: usize = 54usize;
29466    pub const DEFAULT: Self = Self {
29467        severity: MavSeverity::DEFAULT,
29468        text: [0_u8; 50usize],
29469        id: 0_u16,
29470        chunk_seq: 0_u8,
29471    };
29472    #[cfg(feature = "arbitrary")]
29473    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29474        use arbitrary::{Arbitrary, Unstructured};
29475        let mut buf = [0u8; 1024];
29476        rng.fill_bytes(&mut buf);
29477        let mut unstructured = Unstructured::new(&buf);
29478        Self::arbitrary(&mut unstructured).unwrap_or_default()
29479    }
29480}
29481impl Default for STATUSTEXT_DATA {
29482    fn default() -> Self {
29483        Self::DEFAULT.clone()
29484    }
29485}
29486impl MessageData for STATUSTEXT_DATA {
29487    type Message = MavMessage;
29488    const ID: u32 = 253u32;
29489    const NAME: &'static str = "STATUSTEXT";
29490    const EXTRA_CRC: u8 = 83u8;
29491    const ENCODED_LEN: usize = 54usize;
29492    fn deser(
29493        _version: MavlinkVersion,
29494        __input: &[u8],
29495    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29496        let avail_len = __input.len();
29497        let mut payload_buf = [0; Self::ENCODED_LEN];
29498        let mut buf = if avail_len < Self::ENCODED_LEN {
29499            payload_buf[0..avail_len].copy_from_slice(__input);
29500            Bytes::new(&payload_buf)
29501        } else {
29502            Bytes::new(__input)
29503        };
29504        let mut __struct = Self::default();
29505        let tmp = buf.get_u8();
29506        __struct.severity =
29507            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29508                enum_type: "MavSeverity",
29509                value: tmp as u32,
29510            })?;
29511        for v in &mut __struct.text {
29512            let val = buf.get_u8();
29513            *v = val;
29514        }
29515        __struct.id = buf.get_u16_le();
29516        __struct.chunk_seq = buf.get_u8();
29517        Ok(__struct)
29518    }
29519    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29520        let mut __tmp = BytesMut::new(bytes);
29521        #[allow(clippy::absurd_extreme_comparisons)]
29522        #[allow(unused_comparisons)]
29523        if __tmp.remaining() < Self::ENCODED_LEN {
29524            panic!(
29525                "buffer is too small (need {} bytes, but got {})",
29526                Self::ENCODED_LEN,
29527                __tmp.remaining(),
29528            )
29529        }
29530        __tmp.put_u8(self.severity as u8);
29531        for val in &self.text {
29532            __tmp.put_u8(*val);
29533        }
29534        if matches!(version, MavlinkVersion::V2) {
29535            __tmp.put_u16_le(self.id);
29536            __tmp.put_u8(self.chunk_seq);
29537            let len = __tmp.len();
29538            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29539        } else {
29540            __tmp.len()
29541        }
29542    }
29543}
29544#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29545#[doc = ""]
29546#[doc = "ID: 261"]
29547#[derive(Debug, Clone, PartialEq)]
29548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29550#[cfg_attr(feature = "ts", derive(TS))]
29551#[cfg_attr(feature = "ts", ts(export))]
29552pub struct STORAGE_INFORMATION_DATA {
29553    #[doc = "Timestamp (time since system boot)."]
29554    pub time_boot_ms: u32,
29555    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29556    pub total_capacity: f32,
29557    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29558    pub used_capacity: f32,
29559    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29560    pub available_capacity: f32,
29561    #[doc = "Read speed."]
29562    pub read_speed: f32,
29563    #[doc = "Write speed."]
29564    pub write_speed: f32,
29565    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29566    pub storage_id: u8,
29567    #[doc = "Number of storage devices"]
29568    pub storage_count: u8,
29569    #[doc = "Status of storage"]
29570    pub status: StorageStatus,
29571    #[doc = "Type of storage"]
29572    #[cfg_attr(feature = "serde", serde(default))]
29573    pub mavtype: StorageType,
29574    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29575    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29576    #[cfg_attr(
29577        feature = "serde",
29578        serde(
29579            serialize_with = "crate::nulstr::serialize::<_, 32>",
29580            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
29581        )
29582    )]
29583    #[cfg_attr(feature = "ts", ts(type = "string"))]
29584    pub name: [u8; 32],
29585    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29586    #[cfg_attr(feature = "serde", serde(default))]
29587    pub storage_usage: StorageUsageFlag,
29588}
29589impl STORAGE_INFORMATION_DATA {
29590    pub const ENCODED_LEN: usize = 61usize;
29591    pub const DEFAULT: Self = Self {
29592        time_boot_ms: 0_u32,
29593        total_capacity: 0.0_f32,
29594        used_capacity: 0.0_f32,
29595        available_capacity: 0.0_f32,
29596        read_speed: 0.0_f32,
29597        write_speed: 0.0_f32,
29598        storage_id: 0_u8,
29599        storage_count: 0_u8,
29600        status: StorageStatus::DEFAULT,
29601        mavtype: StorageType::DEFAULT,
29602        name: [0_u8; 32usize],
29603        storage_usage: StorageUsageFlag::DEFAULT,
29604    };
29605    #[cfg(feature = "arbitrary")]
29606    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29607        use arbitrary::{Arbitrary, Unstructured};
29608        let mut buf = [0u8; 1024];
29609        rng.fill_bytes(&mut buf);
29610        let mut unstructured = Unstructured::new(&buf);
29611        Self::arbitrary(&mut unstructured).unwrap_or_default()
29612    }
29613}
29614impl Default for STORAGE_INFORMATION_DATA {
29615    fn default() -> Self {
29616        Self::DEFAULT.clone()
29617    }
29618}
29619impl MessageData for STORAGE_INFORMATION_DATA {
29620    type Message = MavMessage;
29621    const ID: u32 = 261u32;
29622    const NAME: &'static str = "STORAGE_INFORMATION";
29623    const EXTRA_CRC: u8 = 179u8;
29624    const ENCODED_LEN: usize = 61usize;
29625    fn deser(
29626        _version: MavlinkVersion,
29627        __input: &[u8],
29628    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29629        let avail_len = __input.len();
29630        let mut payload_buf = [0; Self::ENCODED_LEN];
29631        let mut buf = if avail_len < Self::ENCODED_LEN {
29632            payload_buf[0..avail_len].copy_from_slice(__input);
29633            Bytes::new(&payload_buf)
29634        } else {
29635            Bytes::new(__input)
29636        };
29637        let mut __struct = Self::default();
29638        __struct.time_boot_ms = buf.get_u32_le();
29639        __struct.total_capacity = buf.get_f32_le();
29640        __struct.used_capacity = buf.get_f32_le();
29641        __struct.available_capacity = buf.get_f32_le();
29642        __struct.read_speed = buf.get_f32_le();
29643        __struct.write_speed = buf.get_f32_le();
29644        __struct.storage_id = buf.get_u8();
29645        __struct.storage_count = buf.get_u8();
29646        let tmp = buf.get_u8();
29647        __struct.status =
29648            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29649                enum_type: "StorageStatus",
29650                value: tmp as u32,
29651            })?;
29652        let tmp = buf.get_u8();
29653        __struct.mavtype =
29654            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29655                enum_type: "StorageType",
29656                value: tmp as u32,
29657            })?;
29658        for v in &mut __struct.name {
29659            let val = buf.get_u8();
29660            *v = val;
29661        }
29662        let tmp = buf.get_u8();
29663        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
29664            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29665                flag_type: "StorageUsageFlag",
29666                value: tmp as u32,
29667            })?;
29668        Ok(__struct)
29669    }
29670    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29671        let mut __tmp = BytesMut::new(bytes);
29672        #[allow(clippy::absurd_extreme_comparisons)]
29673        #[allow(unused_comparisons)]
29674        if __tmp.remaining() < Self::ENCODED_LEN {
29675            panic!(
29676                "buffer is too small (need {} bytes, but got {})",
29677                Self::ENCODED_LEN,
29678                __tmp.remaining(),
29679            )
29680        }
29681        __tmp.put_u32_le(self.time_boot_ms);
29682        __tmp.put_f32_le(self.total_capacity);
29683        __tmp.put_f32_le(self.used_capacity);
29684        __tmp.put_f32_le(self.available_capacity);
29685        __tmp.put_f32_le(self.read_speed);
29686        __tmp.put_f32_le(self.write_speed);
29687        __tmp.put_u8(self.storage_id);
29688        __tmp.put_u8(self.storage_count);
29689        __tmp.put_u8(self.status as u8);
29690        if matches!(version, MavlinkVersion::V2) {
29691            __tmp.put_u8(self.mavtype as u8);
29692            for val in &self.name {
29693                __tmp.put_u8(*val);
29694            }
29695            __tmp.put_u8(self.storage_usage.bits());
29696            let len = __tmp.len();
29697            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29698        } else {
29699            __tmp.len()
29700        }
29701    }
29702}
29703#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29704#[doc = ""]
29705#[doc = "ID: 401"]
29706#[derive(Debug, Clone, PartialEq)]
29707#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29708#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29709#[cfg_attr(feature = "ts", derive(TS))]
29710#[cfg_attr(feature = "ts", ts(export))]
29711pub struct SUPPORTED_TUNES_DATA {
29712    #[doc = "Bitfield of supported tune formats."]
29713    pub format: TuneFormat,
29714    #[doc = "System ID"]
29715    pub target_system: u8,
29716    #[doc = "Component ID"]
29717    pub target_component: u8,
29718}
29719impl SUPPORTED_TUNES_DATA {
29720    pub const ENCODED_LEN: usize = 6usize;
29721    pub const DEFAULT: Self = Self {
29722        format: TuneFormat::DEFAULT,
29723        target_system: 0_u8,
29724        target_component: 0_u8,
29725    };
29726    #[cfg(feature = "arbitrary")]
29727    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29728        use arbitrary::{Arbitrary, Unstructured};
29729        let mut buf = [0u8; 1024];
29730        rng.fill_bytes(&mut buf);
29731        let mut unstructured = Unstructured::new(&buf);
29732        Self::arbitrary(&mut unstructured).unwrap_or_default()
29733    }
29734}
29735impl Default for SUPPORTED_TUNES_DATA {
29736    fn default() -> Self {
29737        Self::DEFAULT.clone()
29738    }
29739}
29740impl MessageData for SUPPORTED_TUNES_DATA {
29741    type Message = MavMessage;
29742    const ID: u32 = 401u32;
29743    const NAME: &'static str = "SUPPORTED_TUNES";
29744    const EXTRA_CRC: u8 = 183u8;
29745    const ENCODED_LEN: usize = 6usize;
29746    fn deser(
29747        _version: MavlinkVersion,
29748        __input: &[u8],
29749    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29750        let avail_len = __input.len();
29751        let mut payload_buf = [0; Self::ENCODED_LEN];
29752        let mut buf = if avail_len < Self::ENCODED_LEN {
29753            payload_buf[0..avail_len].copy_from_slice(__input);
29754            Bytes::new(&payload_buf)
29755        } else {
29756            Bytes::new(__input)
29757        };
29758        let mut __struct = Self::default();
29759        let tmp = buf.get_u32_le();
29760        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29761            ::mavlink_core::error::ParserError::InvalidEnum {
29762                enum_type: "TuneFormat",
29763                value: tmp as u32,
29764            },
29765        )?;
29766        __struct.target_system = buf.get_u8();
29767        __struct.target_component = buf.get_u8();
29768        Ok(__struct)
29769    }
29770    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29771        let mut __tmp = BytesMut::new(bytes);
29772        #[allow(clippy::absurd_extreme_comparisons)]
29773        #[allow(unused_comparisons)]
29774        if __tmp.remaining() < Self::ENCODED_LEN {
29775            panic!(
29776                "buffer is too small (need {} bytes, but got {})",
29777                Self::ENCODED_LEN,
29778                __tmp.remaining(),
29779            )
29780        }
29781        __tmp.put_u32_le(self.format as u32);
29782        __tmp.put_u8(self.target_system);
29783        __tmp.put_u8(self.target_component);
29784        if matches!(version, MavlinkVersion::V2) {
29785            let len = __tmp.len();
29786            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29787        } else {
29788            __tmp.len()
29789        }
29790    }
29791}
29792#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29793#[doc = ""]
29794#[doc = "ID: 2"]
29795#[derive(Debug, Clone, PartialEq)]
29796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29798#[cfg_attr(feature = "ts", derive(TS))]
29799#[cfg_attr(feature = "ts", ts(export))]
29800pub struct SYSTEM_TIME_DATA {
29801    #[doc = "Timestamp (UNIX epoch time)."]
29802    pub time_unix_usec: u64,
29803    #[doc = "Timestamp (time since system boot)."]
29804    pub time_boot_ms: u32,
29805}
29806impl SYSTEM_TIME_DATA {
29807    pub const ENCODED_LEN: usize = 12usize;
29808    pub const DEFAULT: Self = Self {
29809        time_unix_usec: 0_u64,
29810        time_boot_ms: 0_u32,
29811    };
29812    #[cfg(feature = "arbitrary")]
29813    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29814        use arbitrary::{Arbitrary, Unstructured};
29815        let mut buf = [0u8; 1024];
29816        rng.fill_bytes(&mut buf);
29817        let mut unstructured = Unstructured::new(&buf);
29818        Self::arbitrary(&mut unstructured).unwrap_or_default()
29819    }
29820}
29821impl Default for SYSTEM_TIME_DATA {
29822    fn default() -> Self {
29823        Self::DEFAULT.clone()
29824    }
29825}
29826impl MessageData for SYSTEM_TIME_DATA {
29827    type Message = MavMessage;
29828    const ID: u32 = 2u32;
29829    const NAME: &'static str = "SYSTEM_TIME";
29830    const EXTRA_CRC: u8 = 137u8;
29831    const ENCODED_LEN: usize = 12usize;
29832    fn deser(
29833        _version: MavlinkVersion,
29834        __input: &[u8],
29835    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29836        let avail_len = __input.len();
29837        let mut payload_buf = [0; Self::ENCODED_LEN];
29838        let mut buf = if avail_len < Self::ENCODED_LEN {
29839            payload_buf[0..avail_len].copy_from_slice(__input);
29840            Bytes::new(&payload_buf)
29841        } else {
29842            Bytes::new(__input)
29843        };
29844        let mut __struct = Self::default();
29845        __struct.time_unix_usec = buf.get_u64_le();
29846        __struct.time_boot_ms = buf.get_u32_le();
29847        Ok(__struct)
29848    }
29849    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29850        let mut __tmp = BytesMut::new(bytes);
29851        #[allow(clippy::absurd_extreme_comparisons)]
29852        #[allow(unused_comparisons)]
29853        if __tmp.remaining() < Self::ENCODED_LEN {
29854            panic!(
29855                "buffer is too small (need {} bytes, but got {})",
29856                Self::ENCODED_LEN,
29857                __tmp.remaining(),
29858            )
29859        }
29860        __tmp.put_u64_le(self.time_unix_usec);
29861        __tmp.put_u32_le(self.time_boot_ms);
29862        if matches!(version, MavlinkVersion::V2) {
29863            let len = __tmp.len();
29864            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29865        } else {
29866            __tmp.len()
29867        }
29868    }
29869}
29870#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29871#[doc = ""]
29872#[doc = "ID: 1"]
29873#[derive(Debug, Clone, PartialEq)]
29874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29876#[cfg_attr(feature = "ts", derive(TS))]
29877#[cfg_attr(feature = "ts", ts(export))]
29878pub struct SYS_STATUS_DATA {
29879    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29880    pub onboard_control_sensors_present: MavSysStatusSensor,
29881    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29882    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29883    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29884    pub onboard_control_sensors_health: MavSysStatusSensor,
29885    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29886    pub load: u16,
29887    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29888    pub voltage_battery: u16,
29889    #[doc = "Battery current, -1: Current not sent by autopilot"]
29890    pub current_battery: i16,
29891    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29892    pub drop_rate_comm: u16,
29893    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29894    pub errors_comm: u16,
29895    #[doc = "Autopilot-specific errors"]
29896    pub errors_count1: u16,
29897    #[doc = "Autopilot-specific errors"]
29898    pub errors_count2: u16,
29899    #[doc = "Autopilot-specific errors"]
29900    pub errors_count3: u16,
29901    #[doc = "Autopilot-specific errors"]
29902    pub errors_count4: u16,
29903    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29904    pub battery_remaining: i8,
29905    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29906    #[cfg_attr(feature = "serde", serde(default))]
29907    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29908    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29909    #[cfg_attr(feature = "serde", serde(default))]
29910    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29911    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29912    #[cfg_attr(feature = "serde", serde(default))]
29913    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29914}
29915impl SYS_STATUS_DATA {
29916    pub const ENCODED_LEN: usize = 43usize;
29917    pub const DEFAULT: Self = Self {
29918        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29919        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29920        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29921        load: 0_u16,
29922        voltage_battery: 0_u16,
29923        current_battery: 0_i16,
29924        drop_rate_comm: 0_u16,
29925        errors_comm: 0_u16,
29926        errors_count1: 0_u16,
29927        errors_count2: 0_u16,
29928        errors_count3: 0_u16,
29929        errors_count4: 0_u16,
29930        battery_remaining: 0_i8,
29931        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29932        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29933        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29934    };
29935    #[cfg(feature = "arbitrary")]
29936    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29937        use arbitrary::{Arbitrary, Unstructured};
29938        let mut buf = [0u8; 1024];
29939        rng.fill_bytes(&mut buf);
29940        let mut unstructured = Unstructured::new(&buf);
29941        Self::arbitrary(&mut unstructured).unwrap_or_default()
29942    }
29943}
29944impl Default for SYS_STATUS_DATA {
29945    fn default() -> Self {
29946        Self::DEFAULT.clone()
29947    }
29948}
29949impl MessageData for SYS_STATUS_DATA {
29950    type Message = MavMessage;
29951    const ID: u32 = 1u32;
29952    const NAME: &'static str = "SYS_STATUS";
29953    const EXTRA_CRC: u8 = 124u8;
29954    const ENCODED_LEN: usize = 43usize;
29955    fn deser(
29956        _version: MavlinkVersion,
29957        __input: &[u8],
29958    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29959        let avail_len = __input.len();
29960        let mut payload_buf = [0; Self::ENCODED_LEN];
29961        let mut buf = if avail_len < Self::ENCODED_LEN {
29962            payload_buf[0..avail_len].copy_from_slice(__input);
29963            Bytes::new(&payload_buf)
29964        } else {
29965            Bytes::new(__input)
29966        };
29967        let mut __struct = Self::default();
29968        let tmp = buf.get_u32_le();
29969        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29970            tmp & MavSysStatusSensor::all().bits(),
29971        )
29972        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29973            flag_type: "MavSysStatusSensor",
29974            value: tmp as u32,
29975        })?;
29976        let tmp = buf.get_u32_le();
29977        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29978            tmp & MavSysStatusSensor::all().bits(),
29979        )
29980        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29981            flag_type: "MavSysStatusSensor",
29982            value: tmp as u32,
29983        })?;
29984        let tmp = buf.get_u32_le();
29985        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29986            tmp & MavSysStatusSensor::all().bits(),
29987        )
29988        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29989            flag_type: "MavSysStatusSensor",
29990            value: tmp as u32,
29991        })?;
29992        __struct.load = buf.get_u16_le();
29993        __struct.voltage_battery = buf.get_u16_le();
29994        __struct.current_battery = buf.get_i16_le();
29995        __struct.drop_rate_comm = buf.get_u16_le();
29996        __struct.errors_comm = buf.get_u16_le();
29997        __struct.errors_count1 = buf.get_u16_le();
29998        __struct.errors_count2 = buf.get_u16_le();
29999        __struct.errors_count3 = buf.get_u16_le();
30000        __struct.errors_count4 = buf.get_u16_le();
30001        __struct.battery_remaining = buf.get_i8();
30002        let tmp = buf.get_u32_le();
30003        __struct.onboard_control_sensors_present_extended =
30004            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
30005                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30006                flag_type: "MavSysStatusSensorExtended",
30007                value: tmp as u32,
30008            })?;
30009        let tmp = buf.get_u32_le();
30010        __struct.onboard_control_sensors_enabled_extended =
30011            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
30012                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30013                flag_type: "MavSysStatusSensorExtended",
30014                value: tmp as u32,
30015            })?;
30016        let tmp = buf.get_u32_le();
30017        __struct.onboard_control_sensors_health_extended =
30018            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
30019                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30020                flag_type: "MavSysStatusSensorExtended",
30021                value: tmp as u32,
30022            })?;
30023        Ok(__struct)
30024    }
30025    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30026        let mut __tmp = BytesMut::new(bytes);
30027        #[allow(clippy::absurd_extreme_comparisons)]
30028        #[allow(unused_comparisons)]
30029        if __tmp.remaining() < Self::ENCODED_LEN {
30030            panic!(
30031                "buffer is too small (need {} bytes, but got {})",
30032                Self::ENCODED_LEN,
30033                __tmp.remaining(),
30034            )
30035        }
30036        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
30037        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
30038        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
30039        __tmp.put_u16_le(self.load);
30040        __tmp.put_u16_le(self.voltage_battery);
30041        __tmp.put_i16_le(self.current_battery);
30042        __tmp.put_u16_le(self.drop_rate_comm);
30043        __tmp.put_u16_le(self.errors_comm);
30044        __tmp.put_u16_le(self.errors_count1);
30045        __tmp.put_u16_le(self.errors_count2);
30046        __tmp.put_u16_le(self.errors_count3);
30047        __tmp.put_u16_le(self.errors_count4);
30048        __tmp.put_i8(self.battery_remaining);
30049        if matches!(version, MavlinkVersion::V2) {
30050            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
30051            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
30052            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
30053            let len = __tmp.len();
30054            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30055        } else {
30056            __tmp.len()
30057        }
30058    }
30059}
30060#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
30061#[doc = ""]
30062#[doc = "ID: 135"]
30063#[derive(Debug, Clone, PartialEq)]
30064#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30065#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30066#[cfg_attr(feature = "ts", derive(TS))]
30067#[cfg_attr(feature = "ts", ts(export))]
30068pub struct TERRAIN_CHECK_DATA {
30069    #[doc = "Latitude"]
30070    pub lat: i32,
30071    #[doc = "Longitude"]
30072    pub lon: i32,
30073}
30074impl TERRAIN_CHECK_DATA {
30075    pub const ENCODED_LEN: usize = 8usize;
30076    pub const DEFAULT: Self = Self {
30077        lat: 0_i32,
30078        lon: 0_i32,
30079    };
30080    #[cfg(feature = "arbitrary")]
30081    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30082        use arbitrary::{Arbitrary, Unstructured};
30083        let mut buf = [0u8; 1024];
30084        rng.fill_bytes(&mut buf);
30085        let mut unstructured = Unstructured::new(&buf);
30086        Self::arbitrary(&mut unstructured).unwrap_or_default()
30087    }
30088}
30089impl Default for TERRAIN_CHECK_DATA {
30090    fn default() -> Self {
30091        Self::DEFAULT.clone()
30092    }
30093}
30094impl MessageData for TERRAIN_CHECK_DATA {
30095    type Message = MavMessage;
30096    const ID: u32 = 135u32;
30097    const NAME: &'static str = "TERRAIN_CHECK";
30098    const EXTRA_CRC: u8 = 203u8;
30099    const ENCODED_LEN: usize = 8usize;
30100    fn deser(
30101        _version: MavlinkVersion,
30102        __input: &[u8],
30103    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30104        let avail_len = __input.len();
30105        let mut payload_buf = [0; Self::ENCODED_LEN];
30106        let mut buf = if avail_len < Self::ENCODED_LEN {
30107            payload_buf[0..avail_len].copy_from_slice(__input);
30108            Bytes::new(&payload_buf)
30109        } else {
30110            Bytes::new(__input)
30111        };
30112        let mut __struct = Self::default();
30113        __struct.lat = buf.get_i32_le();
30114        __struct.lon = buf.get_i32_le();
30115        Ok(__struct)
30116    }
30117    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30118        let mut __tmp = BytesMut::new(bytes);
30119        #[allow(clippy::absurd_extreme_comparisons)]
30120        #[allow(unused_comparisons)]
30121        if __tmp.remaining() < Self::ENCODED_LEN {
30122            panic!(
30123                "buffer is too small (need {} bytes, but got {})",
30124                Self::ENCODED_LEN,
30125                __tmp.remaining(),
30126            )
30127        }
30128        __tmp.put_i32_le(self.lat);
30129        __tmp.put_i32_le(self.lon);
30130        if matches!(version, MavlinkVersion::V2) {
30131            let len = __tmp.len();
30132            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30133        } else {
30134            __tmp.len()
30135        }
30136    }
30137}
30138#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30139#[doc = ""]
30140#[doc = "ID: 134"]
30141#[derive(Debug, Clone, PartialEq)]
30142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30143#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30144#[cfg_attr(feature = "ts", derive(TS))]
30145#[cfg_attr(feature = "ts", ts(export))]
30146pub struct TERRAIN_DATA_DATA {
30147    #[doc = "Latitude of SW corner of first grid"]
30148    pub lat: i32,
30149    #[doc = "Longitude of SW corner of first grid"]
30150    pub lon: i32,
30151    #[doc = "Grid spacing"]
30152    pub grid_spacing: u16,
30153    #[doc = "Terrain data MSL"]
30154    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30155    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30156    pub data: [i16; 16],
30157    #[doc = "bit within the terrain request mask"]
30158    pub gridbit: u8,
30159}
30160impl TERRAIN_DATA_DATA {
30161    pub const ENCODED_LEN: usize = 43usize;
30162    pub const DEFAULT: Self = Self {
30163        lat: 0_i32,
30164        lon: 0_i32,
30165        grid_spacing: 0_u16,
30166        data: [0_i16; 16usize],
30167        gridbit: 0_u8,
30168    };
30169    #[cfg(feature = "arbitrary")]
30170    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30171        use arbitrary::{Arbitrary, Unstructured};
30172        let mut buf = [0u8; 1024];
30173        rng.fill_bytes(&mut buf);
30174        let mut unstructured = Unstructured::new(&buf);
30175        Self::arbitrary(&mut unstructured).unwrap_or_default()
30176    }
30177}
30178impl Default for TERRAIN_DATA_DATA {
30179    fn default() -> Self {
30180        Self::DEFAULT.clone()
30181    }
30182}
30183impl MessageData for TERRAIN_DATA_DATA {
30184    type Message = MavMessage;
30185    const ID: u32 = 134u32;
30186    const NAME: &'static str = "TERRAIN_DATA";
30187    const EXTRA_CRC: u8 = 229u8;
30188    const ENCODED_LEN: usize = 43usize;
30189    fn deser(
30190        _version: MavlinkVersion,
30191        __input: &[u8],
30192    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30193        let avail_len = __input.len();
30194        let mut payload_buf = [0; Self::ENCODED_LEN];
30195        let mut buf = if avail_len < Self::ENCODED_LEN {
30196            payload_buf[0..avail_len].copy_from_slice(__input);
30197            Bytes::new(&payload_buf)
30198        } else {
30199            Bytes::new(__input)
30200        };
30201        let mut __struct = Self::default();
30202        __struct.lat = buf.get_i32_le();
30203        __struct.lon = buf.get_i32_le();
30204        __struct.grid_spacing = buf.get_u16_le();
30205        for v in &mut __struct.data {
30206            let val = buf.get_i16_le();
30207            *v = val;
30208        }
30209        __struct.gridbit = buf.get_u8();
30210        Ok(__struct)
30211    }
30212    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30213        let mut __tmp = BytesMut::new(bytes);
30214        #[allow(clippy::absurd_extreme_comparisons)]
30215        #[allow(unused_comparisons)]
30216        if __tmp.remaining() < Self::ENCODED_LEN {
30217            panic!(
30218                "buffer is too small (need {} bytes, but got {})",
30219                Self::ENCODED_LEN,
30220                __tmp.remaining(),
30221            )
30222        }
30223        __tmp.put_i32_le(self.lat);
30224        __tmp.put_i32_le(self.lon);
30225        __tmp.put_u16_le(self.grid_spacing);
30226        for val in &self.data {
30227            __tmp.put_i16_le(*val);
30228        }
30229        __tmp.put_u8(self.gridbit);
30230        if matches!(version, MavlinkVersion::V2) {
30231            let len = __tmp.len();
30232            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30233        } else {
30234            __tmp.len()
30235        }
30236    }
30237}
30238#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30239#[doc = ""]
30240#[doc = "ID: 136"]
30241#[derive(Debug, Clone, PartialEq)]
30242#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30244#[cfg_attr(feature = "ts", derive(TS))]
30245#[cfg_attr(feature = "ts", ts(export))]
30246pub struct TERRAIN_REPORT_DATA {
30247    #[doc = "Latitude"]
30248    pub lat: i32,
30249    #[doc = "Longitude"]
30250    pub lon: i32,
30251    #[doc = "Terrain height MSL"]
30252    pub terrain_height: f32,
30253    #[doc = "Current vehicle height above lat/lon terrain height"]
30254    pub current_height: f32,
30255    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
30256    pub spacing: u16,
30257    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
30258    pub pending: u16,
30259    #[doc = "Number of 4x4 terrain blocks in memory"]
30260    pub loaded: u16,
30261}
30262impl TERRAIN_REPORT_DATA {
30263    pub const ENCODED_LEN: usize = 22usize;
30264    pub const DEFAULT: Self = Self {
30265        lat: 0_i32,
30266        lon: 0_i32,
30267        terrain_height: 0.0_f32,
30268        current_height: 0.0_f32,
30269        spacing: 0_u16,
30270        pending: 0_u16,
30271        loaded: 0_u16,
30272    };
30273    #[cfg(feature = "arbitrary")]
30274    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30275        use arbitrary::{Arbitrary, Unstructured};
30276        let mut buf = [0u8; 1024];
30277        rng.fill_bytes(&mut buf);
30278        let mut unstructured = Unstructured::new(&buf);
30279        Self::arbitrary(&mut unstructured).unwrap_or_default()
30280    }
30281}
30282impl Default for TERRAIN_REPORT_DATA {
30283    fn default() -> Self {
30284        Self::DEFAULT.clone()
30285    }
30286}
30287impl MessageData for TERRAIN_REPORT_DATA {
30288    type Message = MavMessage;
30289    const ID: u32 = 136u32;
30290    const NAME: &'static str = "TERRAIN_REPORT";
30291    const EXTRA_CRC: u8 = 1u8;
30292    const ENCODED_LEN: usize = 22usize;
30293    fn deser(
30294        _version: MavlinkVersion,
30295        __input: &[u8],
30296    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30297        let avail_len = __input.len();
30298        let mut payload_buf = [0; Self::ENCODED_LEN];
30299        let mut buf = if avail_len < Self::ENCODED_LEN {
30300            payload_buf[0..avail_len].copy_from_slice(__input);
30301            Bytes::new(&payload_buf)
30302        } else {
30303            Bytes::new(__input)
30304        };
30305        let mut __struct = Self::default();
30306        __struct.lat = buf.get_i32_le();
30307        __struct.lon = buf.get_i32_le();
30308        __struct.terrain_height = buf.get_f32_le();
30309        __struct.current_height = buf.get_f32_le();
30310        __struct.spacing = buf.get_u16_le();
30311        __struct.pending = buf.get_u16_le();
30312        __struct.loaded = buf.get_u16_le();
30313        Ok(__struct)
30314    }
30315    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30316        let mut __tmp = BytesMut::new(bytes);
30317        #[allow(clippy::absurd_extreme_comparisons)]
30318        #[allow(unused_comparisons)]
30319        if __tmp.remaining() < Self::ENCODED_LEN {
30320            panic!(
30321                "buffer is too small (need {} bytes, but got {})",
30322                Self::ENCODED_LEN,
30323                __tmp.remaining(),
30324            )
30325        }
30326        __tmp.put_i32_le(self.lat);
30327        __tmp.put_i32_le(self.lon);
30328        __tmp.put_f32_le(self.terrain_height);
30329        __tmp.put_f32_le(self.current_height);
30330        __tmp.put_u16_le(self.spacing);
30331        __tmp.put_u16_le(self.pending);
30332        __tmp.put_u16_le(self.loaded);
30333        if matches!(version, MavlinkVersion::V2) {
30334            let len = __tmp.len();
30335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30336        } else {
30337            __tmp.len()
30338        }
30339    }
30340}
30341#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30342#[doc = ""]
30343#[doc = "ID: 133"]
30344#[derive(Debug, Clone, PartialEq)]
30345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30347#[cfg_attr(feature = "ts", derive(TS))]
30348#[cfg_attr(feature = "ts", ts(export))]
30349pub struct TERRAIN_REQUEST_DATA {
30350    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
30351    pub mask: u64,
30352    #[doc = "Latitude of SW corner of first grid"]
30353    pub lat: i32,
30354    #[doc = "Longitude of SW corner of first grid"]
30355    pub lon: i32,
30356    #[doc = "Grid spacing"]
30357    pub grid_spacing: u16,
30358}
30359impl TERRAIN_REQUEST_DATA {
30360    pub const ENCODED_LEN: usize = 18usize;
30361    pub const DEFAULT: Self = Self {
30362        mask: 0_u64,
30363        lat: 0_i32,
30364        lon: 0_i32,
30365        grid_spacing: 0_u16,
30366    };
30367    #[cfg(feature = "arbitrary")]
30368    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30369        use arbitrary::{Arbitrary, Unstructured};
30370        let mut buf = [0u8; 1024];
30371        rng.fill_bytes(&mut buf);
30372        let mut unstructured = Unstructured::new(&buf);
30373        Self::arbitrary(&mut unstructured).unwrap_or_default()
30374    }
30375}
30376impl Default for TERRAIN_REQUEST_DATA {
30377    fn default() -> Self {
30378        Self::DEFAULT.clone()
30379    }
30380}
30381impl MessageData for TERRAIN_REQUEST_DATA {
30382    type Message = MavMessage;
30383    const ID: u32 = 133u32;
30384    const NAME: &'static str = "TERRAIN_REQUEST";
30385    const EXTRA_CRC: u8 = 6u8;
30386    const ENCODED_LEN: usize = 18usize;
30387    fn deser(
30388        _version: MavlinkVersion,
30389        __input: &[u8],
30390    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30391        let avail_len = __input.len();
30392        let mut payload_buf = [0; Self::ENCODED_LEN];
30393        let mut buf = if avail_len < Self::ENCODED_LEN {
30394            payload_buf[0..avail_len].copy_from_slice(__input);
30395            Bytes::new(&payload_buf)
30396        } else {
30397            Bytes::new(__input)
30398        };
30399        let mut __struct = Self::default();
30400        __struct.mask = buf.get_u64_le();
30401        __struct.lat = buf.get_i32_le();
30402        __struct.lon = buf.get_i32_le();
30403        __struct.grid_spacing = buf.get_u16_le();
30404        Ok(__struct)
30405    }
30406    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30407        let mut __tmp = BytesMut::new(bytes);
30408        #[allow(clippy::absurd_extreme_comparisons)]
30409        #[allow(unused_comparisons)]
30410        if __tmp.remaining() < Self::ENCODED_LEN {
30411            panic!(
30412                "buffer is too small (need {} bytes, but got {})",
30413                Self::ENCODED_LEN,
30414                __tmp.remaining(),
30415            )
30416        }
30417        __tmp.put_u64_le(self.mask);
30418        __tmp.put_i32_le(self.lat);
30419        __tmp.put_i32_le(self.lon);
30420        __tmp.put_u16_le(self.grid_spacing);
30421        if matches!(version, MavlinkVersion::V2) {
30422            let len = __tmp.len();
30423            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30424        } else {
30425            __tmp.len()
30426        }
30427    }
30428}
30429#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
30430#[doc = ""]
30431#[doc = "ID: 111"]
30432#[derive(Debug, Clone, PartialEq)]
30433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30435#[cfg_attr(feature = "ts", derive(TS))]
30436#[cfg_attr(feature = "ts", ts(export))]
30437pub struct TIMESYNC_DATA {
30438    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
30439    pub tc1: i64,
30440    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
30441    pub ts1: i64,
30442    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
30443    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30444    pub target_system: u8,
30445    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
30446    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30447    pub target_component: u8,
30448}
30449impl TIMESYNC_DATA {
30450    pub const ENCODED_LEN: usize = 18usize;
30451    pub const DEFAULT: Self = Self {
30452        tc1: 0_i64,
30453        ts1: 0_i64,
30454        target_system: 0_u8,
30455        target_component: 0_u8,
30456    };
30457    #[cfg(feature = "arbitrary")]
30458    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30459        use arbitrary::{Arbitrary, Unstructured};
30460        let mut buf = [0u8; 1024];
30461        rng.fill_bytes(&mut buf);
30462        let mut unstructured = Unstructured::new(&buf);
30463        Self::arbitrary(&mut unstructured).unwrap_or_default()
30464    }
30465}
30466impl Default for TIMESYNC_DATA {
30467    fn default() -> Self {
30468        Self::DEFAULT.clone()
30469    }
30470}
30471impl MessageData for TIMESYNC_DATA {
30472    type Message = MavMessage;
30473    const ID: u32 = 111u32;
30474    const NAME: &'static str = "TIMESYNC";
30475    const EXTRA_CRC: u8 = 34u8;
30476    const ENCODED_LEN: usize = 18usize;
30477    fn deser(
30478        _version: MavlinkVersion,
30479        __input: &[u8],
30480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30481        let avail_len = __input.len();
30482        let mut payload_buf = [0; Self::ENCODED_LEN];
30483        let mut buf = if avail_len < Self::ENCODED_LEN {
30484            payload_buf[0..avail_len].copy_from_slice(__input);
30485            Bytes::new(&payload_buf)
30486        } else {
30487            Bytes::new(__input)
30488        };
30489        let mut __struct = Self::default();
30490        __struct.tc1 = buf.get_i64_le();
30491        __struct.ts1 = buf.get_i64_le();
30492        __struct.target_system = buf.get_u8();
30493        __struct.target_component = buf.get_u8();
30494        Ok(__struct)
30495    }
30496    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30497        let mut __tmp = BytesMut::new(bytes);
30498        #[allow(clippy::absurd_extreme_comparisons)]
30499        #[allow(unused_comparisons)]
30500        if __tmp.remaining() < Self::ENCODED_LEN {
30501            panic!(
30502                "buffer is too small (need {} bytes, but got {})",
30503                Self::ENCODED_LEN,
30504                __tmp.remaining(),
30505            )
30506        }
30507        __tmp.put_i64_le(self.tc1);
30508        __tmp.put_i64_le(self.ts1);
30509        if matches!(version, MavlinkVersion::V2) {
30510            __tmp.put_u8(self.target_system);
30511            __tmp.put_u8(self.target_component);
30512            let len = __tmp.len();
30513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30514        } else {
30515            __tmp.len()
30516        }
30517    }
30518}
30519#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
30520#[doc = ""]
30521#[doc = "ID: 380"]
30522#[derive(Debug, Clone, PartialEq)]
30523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30525#[cfg_attr(feature = "ts", derive(TS))]
30526#[cfg_attr(feature = "ts", ts(export))]
30527pub struct TIME_ESTIMATE_TO_TARGET_DATA {
30528    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
30529    pub safe_return: i32,
30530    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
30531    pub land: i32,
30532    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
30533    pub mission_next_item: i32,
30534    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
30535    pub mission_end: i32,
30536    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
30537    pub commanded_action: i32,
30538}
30539impl TIME_ESTIMATE_TO_TARGET_DATA {
30540    pub const ENCODED_LEN: usize = 20usize;
30541    pub const DEFAULT: Self = Self {
30542        safe_return: 0_i32,
30543        land: 0_i32,
30544        mission_next_item: 0_i32,
30545        mission_end: 0_i32,
30546        commanded_action: 0_i32,
30547    };
30548    #[cfg(feature = "arbitrary")]
30549    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30550        use arbitrary::{Arbitrary, Unstructured};
30551        let mut buf = [0u8; 1024];
30552        rng.fill_bytes(&mut buf);
30553        let mut unstructured = Unstructured::new(&buf);
30554        Self::arbitrary(&mut unstructured).unwrap_or_default()
30555    }
30556}
30557impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30558    fn default() -> Self {
30559        Self::DEFAULT.clone()
30560    }
30561}
30562impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30563    type Message = MavMessage;
30564    const ID: u32 = 380u32;
30565    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30566    const EXTRA_CRC: u8 = 232u8;
30567    const ENCODED_LEN: usize = 20usize;
30568    fn deser(
30569        _version: MavlinkVersion,
30570        __input: &[u8],
30571    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30572        let avail_len = __input.len();
30573        let mut payload_buf = [0; Self::ENCODED_LEN];
30574        let mut buf = if avail_len < Self::ENCODED_LEN {
30575            payload_buf[0..avail_len].copy_from_slice(__input);
30576            Bytes::new(&payload_buf)
30577        } else {
30578            Bytes::new(__input)
30579        };
30580        let mut __struct = Self::default();
30581        __struct.safe_return = buf.get_i32_le();
30582        __struct.land = buf.get_i32_le();
30583        __struct.mission_next_item = buf.get_i32_le();
30584        __struct.mission_end = buf.get_i32_le();
30585        __struct.commanded_action = buf.get_i32_le();
30586        Ok(__struct)
30587    }
30588    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30589        let mut __tmp = BytesMut::new(bytes);
30590        #[allow(clippy::absurd_extreme_comparisons)]
30591        #[allow(unused_comparisons)]
30592        if __tmp.remaining() < Self::ENCODED_LEN {
30593            panic!(
30594                "buffer is too small (need {} bytes, but got {})",
30595                Self::ENCODED_LEN,
30596                __tmp.remaining(),
30597            )
30598        }
30599        __tmp.put_i32_le(self.safe_return);
30600        __tmp.put_i32_le(self.land);
30601        __tmp.put_i32_le(self.mission_next_item);
30602        __tmp.put_i32_le(self.mission_end);
30603        __tmp.put_i32_le(self.commanded_action);
30604        if matches!(version, MavlinkVersion::V2) {
30605            let len = __tmp.len();
30606            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30607        } else {
30608            __tmp.len()
30609        }
30610    }
30611}
30612#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30613#[doc = ""]
30614#[doc = "ID: 333"]
30615#[derive(Debug, Clone, PartialEq)]
30616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30617#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30618#[cfg_attr(feature = "ts", derive(TS))]
30619#[cfg_attr(feature = "ts", ts(export))]
30620pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30621    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30622    pub time_usec: u64,
30623    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30624    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30625    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30626    pub pos_x: [f32; 5],
30627    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30628    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30629    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30630    pub pos_y: [f32; 5],
30631    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30632    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30633    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30634    pub pos_z: [f32; 5],
30635    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30636    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30637    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30638    pub delta: [f32; 5],
30639    #[doc = "Yaw. Set to NaN for unchanged"]
30640    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30641    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30642    pub pos_yaw: [f32; 5],
30643    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30644    pub valid_points: u8,
30645}
30646impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30647    pub const ENCODED_LEN: usize = 109usize;
30648    pub const DEFAULT: Self = Self {
30649        time_usec: 0_u64,
30650        pos_x: [0.0_f32; 5usize],
30651        pos_y: [0.0_f32; 5usize],
30652        pos_z: [0.0_f32; 5usize],
30653        delta: [0.0_f32; 5usize],
30654        pos_yaw: [0.0_f32; 5usize],
30655        valid_points: 0_u8,
30656    };
30657    #[cfg(feature = "arbitrary")]
30658    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30659        use arbitrary::{Arbitrary, Unstructured};
30660        let mut buf = [0u8; 1024];
30661        rng.fill_bytes(&mut buf);
30662        let mut unstructured = Unstructured::new(&buf);
30663        Self::arbitrary(&mut unstructured).unwrap_or_default()
30664    }
30665}
30666impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30667    fn default() -> Self {
30668        Self::DEFAULT.clone()
30669    }
30670}
30671impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30672    type Message = MavMessage;
30673    const ID: u32 = 333u32;
30674    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30675    const EXTRA_CRC: u8 = 231u8;
30676    const ENCODED_LEN: usize = 109usize;
30677    fn deser(
30678        _version: MavlinkVersion,
30679        __input: &[u8],
30680    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30681        let avail_len = __input.len();
30682        let mut payload_buf = [0; Self::ENCODED_LEN];
30683        let mut buf = if avail_len < Self::ENCODED_LEN {
30684            payload_buf[0..avail_len].copy_from_slice(__input);
30685            Bytes::new(&payload_buf)
30686        } else {
30687            Bytes::new(__input)
30688        };
30689        let mut __struct = Self::default();
30690        __struct.time_usec = buf.get_u64_le();
30691        for v in &mut __struct.pos_x {
30692            let val = buf.get_f32_le();
30693            *v = val;
30694        }
30695        for v in &mut __struct.pos_y {
30696            let val = buf.get_f32_le();
30697            *v = val;
30698        }
30699        for v in &mut __struct.pos_z {
30700            let val = buf.get_f32_le();
30701            *v = val;
30702        }
30703        for v in &mut __struct.delta {
30704            let val = buf.get_f32_le();
30705            *v = val;
30706        }
30707        for v in &mut __struct.pos_yaw {
30708            let val = buf.get_f32_le();
30709            *v = val;
30710        }
30711        __struct.valid_points = buf.get_u8();
30712        Ok(__struct)
30713    }
30714    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30715        let mut __tmp = BytesMut::new(bytes);
30716        #[allow(clippy::absurd_extreme_comparisons)]
30717        #[allow(unused_comparisons)]
30718        if __tmp.remaining() < Self::ENCODED_LEN {
30719            panic!(
30720                "buffer is too small (need {} bytes, but got {})",
30721                Self::ENCODED_LEN,
30722                __tmp.remaining(),
30723            )
30724        }
30725        __tmp.put_u64_le(self.time_usec);
30726        for val in &self.pos_x {
30727            __tmp.put_f32_le(*val);
30728        }
30729        for val in &self.pos_y {
30730            __tmp.put_f32_le(*val);
30731        }
30732        for val in &self.pos_z {
30733            __tmp.put_f32_le(*val);
30734        }
30735        for val in &self.delta {
30736            __tmp.put_f32_le(*val);
30737        }
30738        for val in &self.pos_yaw {
30739            __tmp.put_f32_le(*val);
30740        }
30741        __tmp.put_u8(self.valid_points);
30742        if matches!(version, MavlinkVersion::V2) {
30743            let len = __tmp.len();
30744            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30745        } else {
30746            __tmp.len()
30747        }
30748    }
30749}
30750#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30751#[doc = ""]
30752#[doc = "ID: 332"]
30753#[derive(Debug, Clone, PartialEq)]
30754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30756#[cfg_attr(feature = "ts", derive(TS))]
30757#[cfg_attr(feature = "ts", ts(export))]
30758pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30759    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30760    pub time_usec: u64,
30761    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30762    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30763    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30764    pub pos_x: [f32; 5],
30765    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30766    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30767    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30768    pub pos_y: [f32; 5],
30769    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30770    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30771    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30772    pub pos_z: [f32; 5],
30773    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30774    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30775    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30776    pub vel_x: [f32; 5],
30777    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30778    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30779    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30780    pub vel_y: [f32; 5],
30781    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30782    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30783    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30784    pub vel_z: [f32; 5],
30785    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30786    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30787    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30788    pub acc_x: [f32; 5],
30789    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30790    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30791    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30792    pub acc_y: [f32; 5],
30793    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30794    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30795    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30796    pub acc_z: [f32; 5],
30797    #[doc = "Yaw angle, set to NaN if not being used"]
30798    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30799    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30800    pub pos_yaw: [f32; 5],
30801    #[doc = "Yaw rate, set to NaN if not being used"]
30802    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30803    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30804    pub vel_yaw: [f32; 5],
30805    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30806    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30807    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30808    pub command: [u16; 5],
30809    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30810    pub valid_points: u8,
30811}
30812impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30813    pub const ENCODED_LEN: usize = 239usize;
30814    pub const DEFAULT: Self = Self {
30815        time_usec: 0_u64,
30816        pos_x: [0.0_f32; 5usize],
30817        pos_y: [0.0_f32; 5usize],
30818        pos_z: [0.0_f32; 5usize],
30819        vel_x: [0.0_f32; 5usize],
30820        vel_y: [0.0_f32; 5usize],
30821        vel_z: [0.0_f32; 5usize],
30822        acc_x: [0.0_f32; 5usize],
30823        acc_y: [0.0_f32; 5usize],
30824        acc_z: [0.0_f32; 5usize],
30825        pos_yaw: [0.0_f32; 5usize],
30826        vel_yaw: [0.0_f32; 5usize],
30827        command: [0_u16; 5usize],
30828        valid_points: 0_u8,
30829    };
30830    #[cfg(feature = "arbitrary")]
30831    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30832        use arbitrary::{Arbitrary, Unstructured};
30833        let mut buf = [0u8; 1024];
30834        rng.fill_bytes(&mut buf);
30835        let mut unstructured = Unstructured::new(&buf);
30836        Self::arbitrary(&mut unstructured).unwrap_or_default()
30837    }
30838}
30839impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30840    fn default() -> Self {
30841        Self::DEFAULT.clone()
30842    }
30843}
30844impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30845    type Message = MavMessage;
30846    const ID: u32 = 332u32;
30847    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30848    const EXTRA_CRC: u8 = 236u8;
30849    const ENCODED_LEN: usize = 239usize;
30850    fn deser(
30851        _version: MavlinkVersion,
30852        __input: &[u8],
30853    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30854        let avail_len = __input.len();
30855        let mut payload_buf = [0; Self::ENCODED_LEN];
30856        let mut buf = if avail_len < Self::ENCODED_LEN {
30857            payload_buf[0..avail_len].copy_from_slice(__input);
30858            Bytes::new(&payload_buf)
30859        } else {
30860            Bytes::new(__input)
30861        };
30862        let mut __struct = Self::default();
30863        __struct.time_usec = buf.get_u64_le();
30864        for v in &mut __struct.pos_x {
30865            let val = buf.get_f32_le();
30866            *v = val;
30867        }
30868        for v in &mut __struct.pos_y {
30869            let val = buf.get_f32_le();
30870            *v = val;
30871        }
30872        for v in &mut __struct.pos_z {
30873            let val = buf.get_f32_le();
30874            *v = val;
30875        }
30876        for v in &mut __struct.vel_x {
30877            let val = buf.get_f32_le();
30878            *v = val;
30879        }
30880        for v in &mut __struct.vel_y {
30881            let val = buf.get_f32_le();
30882            *v = val;
30883        }
30884        for v in &mut __struct.vel_z {
30885            let val = buf.get_f32_le();
30886            *v = val;
30887        }
30888        for v in &mut __struct.acc_x {
30889            let val = buf.get_f32_le();
30890            *v = val;
30891        }
30892        for v in &mut __struct.acc_y {
30893            let val = buf.get_f32_le();
30894            *v = val;
30895        }
30896        for v in &mut __struct.acc_z {
30897            let val = buf.get_f32_le();
30898            *v = val;
30899        }
30900        for v in &mut __struct.pos_yaw {
30901            let val = buf.get_f32_le();
30902            *v = val;
30903        }
30904        for v in &mut __struct.vel_yaw {
30905            let val = buf.get_f32_le();
30906            *v = val;
30907        }
30908        for v in &mut __struct.command {
30909            let val = buf.get_u16_le();
30910            *v = val;
30911        }
30912        __struct.valid_points = buf.get_u8();
30913        Ok(__struct)
30914    }
30915    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30916        let mut __tmp = BytesMut::new(bytes);
30917        #[allow(clippy::absurd_extreme_comparisons)]
30918        #[allow(unused_comparisons)]
30919        if __tmp.remaining() < Self::ENCODED_LEN {
30920            panic!(
30921                "buffer is too small (need {} bytes, but got {})",
30922                Self::ENCODED_LEN,
30923                __tmp.remaining(),
30924            )
30925        }
30926        __tmp.put_u64_le(self.time_usec);
30927        for val in &self.pos_x {
30928            __tmp.put_f32_le(*val);
30929        }
30930        for val in &self.pos_y {
30931            __tmp.put_f32_le(*val);
30932        }
30933        for val in &self.pos_z {
30934            __tmp.put_f32_le(*val);
30935        }
30936        for val in &self.vel_x {
30937            __tmp.put_f32_le(*val);
30938        }
30939        for val in &self.vel_y {
30940            __tmp.put_f32_le(*val);
30941        }
30942        for val in &self.vel_z {
30943            __tmp.put_f32_le(*val);
30944        }
30945        for val in &self.acc_x {
30946            __tmp.put_f32_le(*val);
30947        }
30948        for val in &self.acc_y {
30949            __tmp.put_f32_le(*val);
30950        }
30951        for val in &self.acc_z {
30952            __tmp.put_f32_le(*val);
30953        }
30954        for val in &self.pos_yaw {
30955            __tmp.put_f32_le(*val);
30956        }
30957        for val in &self.vel_yaw {
30958            __tmp.put_f32_le(*val);
30959        }
30960        for val in &self.command {
30961            __tmp.put_u16_le(*val);
30962        }
30963        __tmp.put_u8(self.valid_points);
30964        if matches!(version, MavlinkVersion::V2) {
30965            let len = __tmp.len();
30966            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30967        } else {
30968            __tmp.len()
30969        }
30970    }
30971}
30972#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30973#[doc = ""]
30974#[doc = "ID: 385"]
30975#[derive(Debug, Clone, PartialEq)]
30976#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30978#[cfg_attr(feature = "ts", derive(TS))]
30979#[cfg_attr(feature = "ts", ts(export))]
30980pub struct TUNNEL_DATA {
30981    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30982    pub payload_type: MavTunnelPayloadType,
30983    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30984    pub target_system: u8,
30985    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30986    pub target_component: u8,
30987    #[doc = "Length of the data transported in payload"]
30988    pub payload_length: u8,
30989    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30990    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30991    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30992    pub payload: [u8; 128],
30993}
30994impl TUNNEL_DATA {
30995    pub const ENCODED_LEN: usize = 133usize;
30996    pub const DEFAULT: Self = Self {
30997        payload_type: MavTunnelPayloadType::DEFAULT,
30998        target_system: 0_u8,
30999        target_component: 0_u8,
31000        payload_length: 0_u8,
31001        payload: [0_u8; 128usize],
31002    };
31003    #[cfg(feature = "arbitrary")]
31004    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31005        use arbitrary::{Arbitrary, Unstructured};
31006        let mut buf = [0u8; 1024];
31007        rng.fill_bytes(&mut buf);
31008        let mut unstructured = Unstructured::new(&buf);
31009        Self::arbitrary(&mut unstructured).unwrap_or_default()
31010    }
31011}
31012impl Default for TUNNEL_DATA {
31013    fn default() -> Self {
31014        Self::DEFAULT.clone()
31015    }
31016}
31017impl MessageData for TUNNEL_DATA {
31018    type Message = MavMessage;
31019    const ID: u32 = 385u32;
31020    const NAME: &'static str = "TUNNEL";
31021    const EXTRA_CRC: u8 = 147u8;
31022    const ENCODED_LEN: usize = 133usize;
31023    fn deser(
31024        _version: MavlinkVersion,
31025        __input: &[u8],
31026    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31027        let avail_len = __input.len();
31028        let mut payload_buf = [0; Self::ENCODED_LEN];
31029        let mut buf = if avail_len < Self::ENCODED_LEN {
31030            payload_buf[0..avail_len].copy_from_slice(__input);
31031            Bytes::new(&payload_buf)
31032        } else {
31033            Bytes::new(__input)
31034        };
31035        let mut __struct = Self::default();
31036        let tmp = buf.get_u16_le();
31037        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
31038            ::mavlink_core::error::ParserError::InvalidEnum {
31039                enum_type: "MavTunnelPayloadType",
31040                value: tmp as u32,
31041            },
31042        )?;
31043        __struct.target_system = buf.get_u8();
31044        __struct.target_component = buf.get_u8();
31045        __struct.payload_length = buf.get_u8();
31046        for v in &mut __struct.payload {
31047            let val = buf.get_u8();
31048            *v = val;
31049        }
31050        Ok(__struct)
31051    }
31052    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31053        let mut __tmp = BytesMut::new(bytes);
31054        #[allow(clippy::absurd_extreme_comparisons)]
31055        #[allow(unused_comparisons)]
31056        if __tmp.remaining() < Self::ENCODED_LEN {
31057            panic!(
31058                "buffer is too small (need {} bytes, but got {})",
31059                Self::ENCODED_LEN,
31060                __tmp.remaining(),
31061            )
31062        }
31063        __tmp.put_u16_le(self.payload_type as u16);
31064        __tmp.put_u8(self.target_system);
31065        __tmp.put_u8(self.target_component);
31066        __tmp.put_u8(self.payload_length);
31067        for val in &self.payload {
31068            __tmp.put_u8(*val);
31069        }
31070        if matches!(version, MavlinkVersion::V2) {
31071            let len = __tmp.len();
31072            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31073        } else {
31074            __tmp.len()
31075        }
31076    }
31077}
31078#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
31079#[doc = ""]
31080#[doc = "ID: 311"]
31081#[derive(Debug, Clone, PartialEq)]
31082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31084#[cfg_attr(feature = "ts", derive(TS))]
31085#[cfg_attr(feature = "ts", ts(export))]
31086pub struct UAVCAN_NODE_INFO_DATA {
31087    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31088    pub time_usec: u64,
31089    #[doc = "Time since the start-up of the node."]
31090    pub uptime_sec: u32,
31091    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
31092    pub sw_vcs_commit: u32,
31093    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
31094    #[cfg_attr(
31095        feature = "serde",
31096        serde(
31097            serialize_with = "crate::nulstr::serialize::<_, 80>",
31098            deserialize_with = "crate::nulstr::deserialize::<_, 80>"
31099        )
31100    )]
31101    #[cfg_attr(feature = "ts", ts(type = "string"))]
31102    pub name: [u8; 80],
31103    #[doc = "Hardware major version number."]
31104    pub hw_version_major: u8,
31105    #[doc = "Hardware minor version number."]
31106    pub hw_version_minor: u8,
31107    #[doc = "Hardware unique 128-bit ID."]
31108    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31109    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31110    pub hw_unique_id: [u8; 16],
31111    #[doc = "Software major version number."]
31112    pub sw_version_major: u8,
31113    #[doc = "Software minor version number."]
31114    pub sw_version_minor: u8,
31115}
31116impl UAVCAN_NODE_INFO_DATA {
31117    pub const ENCODED_LEN: usize = 116usize;
31118    pub const DEFAULT: Self = Self {
31119        time_usec: 0_u64,
31120        uptime_sec: 0_u32,
31121        sw_vcs_commit: 0_u32,
31122        name: [0_u8; 80usize],
31123        hw_version_major: 0_u8,
31124        hw_version_minor: 0_u8,
31125        hw_unique_id: [0_u8; 16usize],
31126        sw_version_major: 0_u8,
31127        sw_version_minor: 0_u8,
31128    };
31129    #[cfg(feature = "arbitrary")]
31130    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31131        use arbitrary::{Arbitrary, Unstructured};
31132        let mut buf = [0u8; 1024];
31133        rng.fill_bytes(&mut buf);
31134        let mut unstructured = Unstructured::new(&buf);
31135        Self::arbitrary(&mut unstructured).unwrap_or_default()
31136    }
31137}
31138impl Default for UAVCAN_NODE_INFO_DATA {
31139    fn default() -> Self {
31140        Self::DEFAULT.clone()
31141    }
31142}
31143impl MessageData for UAVCAN_NODE_INFO_DATA {
31144    type Message = MavMessage;
31145    const ID: u32 = 311u32;
31146    const NAME: &'static str = "UAVCAN_NODE_INFO";
31147    const EXTRA_CRC: u8 = 95u8;
31148    const ENCODED_LEN: usize = 116usize;
31149    fn deser(
31150        _version: MavlinkVersion,
31151        __input: &[u8],
31152    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31153        let avail_len = __input.len();
31154        let mut payload_buf = [0; Self::ENCODED_LEN];
31155        let mut buf = if avail_len < Self::ENCODED_LEN {
31156            payload_buf[0..avail_len].copy_from_slice(__input);
31157            Bytes::new(&payload_buf)
31158        } else {
31159            Bytes::new(__input)
31160        };
31161        let mut __struct = Self::default();
31162        __struct.time_usec = buf.get_u64_le();
31163        __struct.uptime_sec = buf.get_u32_le();
31164        __struct.sw_vcs_commit = buf.get_u32_le();
31165        for v in &mut __struct.name {
31166            let val = buf.get_u8();
31167            *v = val;
31168        }
31169        __struct.hw_version_major = buf.get_u8();
31170        __struct.hw_version_minor = buf.get_u8();
31171        for v in &mut __struct.hw_unique_id {
31172            let val = buf.get_u8();
31173            *v = val;
31174        }
31175        __struct.sw_version_major = buf.get_u8();
31176        __struct.sw_version_minor = buf.get_u8();
31177        Ok(__struct)
31178    }
31179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31180        let mut __tmp = BytesMut::new(bytes);
31181        #[allow(clippy::absurd_extreme_comparisons)]
31182        #[allow(unused_comparisons)]
31183        if __tmp.remaining() < Self::ENCODED_LEN {
31184            panic!(
31185                "buffer is too small (need {} bytes, but got {})",
31186                Self::ENCODED_LEN,
31187                __tmp.remaining(),
31188            )
31189        }
31190        __tmp.put_u64_le(self.time_usec);
31191        __tmp.put_u32_le(self.uptime_sec);
31192        __tmp.put_u32_le(self.sw_vcs_commit);
31193        for val in &self.name {
31194            __tmp.put_u8(*val);
31195        }
31196        __tmp.put_u8(self.hw_version_major);
31197        __tmp.put_u8(self.hw_version_minor);
31198        for val in &self.hw_unique_id {
31199            __tmp.put_u8(*val);
31200        }
31201        __tmp.put_u8(self.sw_version_major);
31202        __tmp.put_u8(self.sw_version_minor);
31203        if matches!(version, MavlinkVersion::V2) {
31204            let len = __tmp.len();
31205            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31206        } else {
31207            __tmp.len()
31208        }
31209    }
31210}
31211#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
31212#[doc = ""]
31213#[doc = "ID: 310"]
31214#[derive(Debug, Clone, PartialEq)]
31215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31217#[cfg_attr(feature = "ts", derive(TS))]
31218#[cfg_attr(feature = "ts", ts(export))]
31219pub struct UAVCAN_NODE_STATUS_DATA {
31220    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31221    pub time_usec: u64,
31222    #[doc = "Time since the start-up of the node."]
31223    pub uptime_sec: u32,
31224    #[doc = "Vendor-specific status information."]
31225    pub vendor_specific_status_code: u16,
31226    #[doc = "Generalized node health status."]
31227    pub health: UavcanNodeHealth,
31228    #[doc = "Generalized operating mode."]
31229    pub mode: UavcanNodeMode,
31230    #[doc = "Not used currently."]
31231    pub sub_mode: u8,
31232}
31233impl UAVCAN_NODE_STATUS_DATA {
31234    pub const ENCODED_LEN: usize = 17usize;
31235    pub const DEFAULT: Self = Self {
31236        time_usec: 0_u64,
31237        uptime_sec: 0_u32,
31238        vendor_specific_status_code: 0_u16,
31239        health: UavcanNodeHealth::DEFAULT,
31240        mode: UavcanNodeMode::DEFAULT,
31241        sub_mode: 0_u8,
31242    };
31243    #[cfg(feature = "arbitrary")]
31244    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31245        use arbitrary::{Arbitrary, Unstructured};
31246        let mut buf = [0u8; 1024];
31247        rng.fill_bytes(&mut buf);
31248        let mut unstructured = Unstructured::new(&buf);
31249        Self::arbitrary(&mut unstructured).unwrap_or_default()
31250    }
31251}
31252impl Default for UAVCAN_NODE_STATUS_DATA {
31253    fn default() -> Self {
31254        Self::DEFAULT.clone()
31255    }
31256}
31257impl MessageData for UAVCAN_NODE_STATUS_DATA {
31258    type Message = MavMessage;
31259    const ID: u32 = 310u32;
31260    const NAME: &'static str = "UAVCAN_NODE_STATUS";
31261    const EXTRA_CRC: u8 = 28u8;
31262    const ENCODED_LEN: usize = 17usize;
31263    fn deser(
31264        _version: MavlinkVersion,
31265        __input: &[u8],
31266    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31267        let avail_len = __input.len();
31268        let mut payload_buf = [0; Self::ENCODED_LEN];
31269        let mut buf = if avail_len < Self::ENCODED_LEN {
31270            payload_buf[0..avail_len].copy_from_slice(__input);
31271            Bytes::new(&payload_buf)
31272        } else {
31273            Bytes::new(__input)
31274        };
31275        let mut __struct = Self::default();
31276        __struct.time_usec = buf.get_u64_le();
31277        __struct.uptime_sec = buf.get_u32_le();
31278        __struct.vendor_specific_status_code = buf.get_u16_le();
31279        let tmp = buf.get_u8();
31280        __struct.health =
31281            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31282                enum_type: "UavcanNodeHealth",
31283                value: tmp as u32,
31284            })?;
31285        let tmp = buf.get_u8();
31286        __struct.mode =
31287            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31288                enum_type: "UavcanNodeMode",
31289                value: tmp as u32,
31290            })?;
31291        __struct.sub_mode = buf.get_u8();
31292        Ok(__struct)
31293    }
31294    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31295        let mut __tmp = BytesMut::new(bytes);
31296        #[allow(clippy::absurd_extreme_comparisons)]
31297        #[allow(unused_comparisons)]
31298        if __tmp.remaining() < Self::ENCODED_LEN {
31299            panic!(
31300                "buffer is too small (need {} bytes, but got {})",
31301                Self::ENCODED_LEN,
31302                __tmp.remaining(),
31303            )
31304        }
31305        __tmp.put_u64_le(self.time_usec);
31306        __tmp.put_u32_le(self.uptime_sec);
31307        __tmp.put_u16_le(self.vendor_specific_status_code);
31308        __tmp.put_u8(self.health as u8);
31309        __tmp.put_u8(self.mode as u8);
31310        __tmp.put_u8(self.sub_mode);
31311        if matches!(version, MavlinkVersion::V2) {
31312            let len = __tmp.len();
31313            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31314        } else {
31315            __tmp.len()
31316        }
31317    }
31318}
31319#[doc = "The global position resulting from GPS and sensor fusion."]
31320#[doc = ""]
31321#[doc = "ID: 340"]
31322#[derive(Debug, Clone, PartialEq)]
31323#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31324#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31325#[cfg_attr(feature = "ts", derive(TS))]
31326#[cfg_attr(feature = "ts", ts(export))]
31327pub struct UTM_GLOBAL_POSITION_DATA {
31328    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
31329    pub time: u64,
31330    #[doc = "Latitude (WGS84)"]
31331    pub lat: i32,
31332    #[doc = "Longitude (WGS84)"]
31333    pub lon: i32,
31334    #[doc = "Altitude (WGS84)"]
31335    pub alt: i32,
31336    #[doc = "Altitude above ground"]
31337    pub relative_alt: i32,
31338    #[doc = "Next waypoint, latitude (WGS84)"]
31339    pub next_lat: i32,
31340    #[doc = "Next waypoint, longitude (WGS84)"]
31341    pub next_lon: i32,
31342    #[doc = "Next waypoint, altitude (WGS84)"]
31343    pub next_alt: i32,
31344    #[doc = "Ground X speed (latitude, positive north)"]
31345    pub vx: i16,
31346    #[doc = "Ground Y speed (longitude, positive east)"]
31347    pub vy: i16,
31348    #[doc = "Ground Z speed (altitude, positive down)"]
31349    pub vz: i16,
31350    #[doc = "Horizontal position uncertainty (standard deviation)"]
31351    pub h_acc: u16,
31352    #[doc = "Altitude uncertainty (standard deviation)"]
31353    pub v_acc: u16,
31354    #[doc = "Speed uncertainty (standard deviation)"]
31355    pub vel_acc: u16,
31356    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
31357    pub update_rate: u16,
31358    #[doc = "Unique UAS ID."]
31359    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31360    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31361    pub uas_id: [u8; 18],
31362    #[doc = "Flight state"]
31363    pub flight_state: UtmFlightState,
31364    #[doc = "Bitwise OR combination of the data available flags."]
31365    pub flags: UtmDataAvailFlags,
31366}
31367impl UTM_GLOBAL_POSITION_DATA {
31368    pub const ENCODED_LEN: usize = 70usize;
31369    pub const DEFAULT: Self = Self {
31370        time: 0_u64,
31371        lat: 0_i32,
31372        lon: 0_i32,
31373        alt: 0_i32,
31374        relative_alt: 0_i32,
31375        next_lat: 0_i32,
31376        next_lon: 0_i32,
31377        next_alt: 0_i32,
31378        vx: 0_i16,
31379        vy: 0_i16,
31380        vz: 0_i16,
31381        h_acc: 0_u16,
31382        v_acc: 0_u16,
31383        vel_acc: 0_u16,
31384        update_rate: 0_u16,
31385        uas_id: [0_u8; 18usize],
31386        flight_state: UtmFlightState::DEFAULT,
31387        flags: UtmDataAvailFlags::DEFAULT,
31388    };
31389    #[cfg(feature = "arbitrary")]
31390    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31391        use arbitrary::{Arbitrary, Unstructured};
31392        let mut buf = [0u8; 1024];
31393        rng.fill_bytes(&mut buf);
31394        let mut unstructured = Unstructured::new(&buf);
31395        Self::arbitrary(&mut unstructured).unwrap_or_default()
31396    }
31397}
31398impl Default for UTM_GLOBAL_POSITION_DATA {
31399    fn default() -> Self {
31400        Self::DEFAULT.clone()
31401    }
31402}
31403impl MessageData for UTM_GLOBAL_POSITION_DATA {
31404    type Message = MavMessage;
31405    const ID: u32 = 340u32;
31406    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31407    const EXTRA_CRC: u8 = 99u8;
31408    const ENCODED_LEN: usize = 70usize;
31409    fn deser(
31410        _version: MavlinkVersion,
31411        __input: &[u8],
31412    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31413        let avail_len = __input.len();
31414        let mut payload_buf = [0; Self::ENCODED_LEN];
31415        let mut buf = if avail_len < Self::ENCODED_LEN {
31416            payload_buf[0..avail_len].copy_from_slice(__input);
31417            Bytes::new(&payload_buf)
31418        } else {
31419            Bytes::new(__input)
31420        };
31421        let mut __struct = Self::default();
31422        __struct.time = buf.get_u64_le();
31423        __struct.lat = buf.get_i32_le();
31424        __struct.lon = buf.get_i32_le();
31425        __struct.alt = buf.get_i32_le();
31426        __struct.relative_alt = buf.get_i32_le();
31427        __struct.next_lat = buf.get_i32_le();
31428        __struct.next_lon = buf.get_i32_le();
31429        __struct.next_alt = buf.get_i32_le();
31430        __struct.vx = buf.get_i16_le();
31431        __struct.vy = buf.get_i16_le();
31432        __struct.vz = buf.get_i16_le();
31433        __struct.h_acc = buf.get_u16_le();
31434        __struct.v_acc = buf.get_u16_le();
31435        __struct.vel_acc = buf.get_u16_le();
31436        __struct.update_rate = buf.get_u16_le();
31437        for v in &mut __struct.uas_id {
31438            let val = buf.get_u8();
31439            *v = val;
31440        }
31441        let tmp = buf.get_u8();
31442        __struct.flight_state =
31443            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31444                enum_type: "UtmFlightState",
31445                value: tmp as u32,
31446            })?;
31447        let tmp = buf.get_u8();
31448        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
31449            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31450                flag_type: "UtmDataAvailFlags",
31451                value: tmp as u32,
31452            })?;
31453        Ok(__struct)
31454    }
31455    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31456        let mut __tmp = BytesMut::new(bytes);
31457        #[allow(clippy::absurd_extreme_comparisons)]
31458        #[allow(unused_comparisons)]
31459        if __tmp.remaining() < Self::ENCODED_LEN {
31460            panic!(
31461                "buffer is too small (need {} bytes, but got {})",
31462                Self::ENCODED_LEN,
31463                __tmp.remaining(),
31464            )
31465        }
31466        __tmp.put_u64_le(self.time);
31467        __tmp.put_i32_le(self.lat);
31468        __tmp.put_i32_le(self.lon);
31469        __tmp.put_i32_le(self.alt);
31470        __tmp.put_i32_le(self.relative_alt);
31471        __tmp.put_i32_le(self.next_lat);
31472        __tmp.put_i32_le(self.next_lon);
31473        __tmp.put_i32_le(self.next_alt);
31474        __tmp.put_i16_le(self.vx);
31475        __tmp.put_i16_le(self.vy);
31476        __tmp.put_i16_le(self.vz);
31477        __tmp.put_u16_le(self.h_acc);
31478        __tmp.put_u16_le(self.v_acc);
31479        __tmp.put_u16_le(self.vel_acc);
31480        __tmp.put_u16_le(self.update_rate);
31481        for val in &self.uas_id {
31482            __tmp.put_u8(*val);
31483        }
31484        __tmp.put_u8(self.flight_state as u8);
31485        __tmp.put_u8(self.flags.bits());
31486        if matches!(version, MavlinkVersion::V2) {
31487            let len = __tmp.len();
31488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31489        } else {
31490            __tmp.len()
31491        }
31492    }
31493}
31494#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31495#[doc = ""]
31496#[doc = "ID: 248"]
31497#[derive(Debug, Clone, PartialEq)]
31498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31500#[cfg_attr(feature = "ts", derive(TS))]
31501#[cfg_attr(feature = "ts", ts(export))]
31502pub struct V2_EXTENSION_DATA {
31503    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31504    pub message_type: u16,
31505    #[doc = "Network ID (0 for broadcast)"]
31506    pub target_network: u8,
31507    #[doc = "System ID (0 for broadcast)"]
31508    pub target_system: u8,
31509    #[doc = "Component ID (0 for broadcast)"]
31510    pub target_component: u8,
31511    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31512    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31513    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31514    pub payload: [u8; 249],
31515}
31516impl V2_EXTENSION_DATA {
31517    pub const ENCODED_LEN: usize = 254usize;
31518    pub const DEFAULT: Self = Self {
31519        message_type: 0_u16,
31520        target_network: 0_u8,
31521        target_system: 0_u8,
31522        target_component: 0_u8,
31523        payload: [0_u8; 249usize],
31524    };
31525    #[cfg(feature = "arbitrary")]
31526    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31527        use arbitrary::{Arbitrary, Unstructured};
31528        let mut buf = [0u8; 1024];
31529        rng.fill_bytes(&mut buf);
31530        let mut unstructured = Unstructured::new(&buf);
31531        Self::arbitrary(&mut unstructured).unwrap_or_default()
31532    }
31533}
31534impl Default for V2_EXTENSION_DATA {
31535    fn default() -> Self {
31536        Self::DEFAULT.clone()
31537    }
31538}
31539impl MessageData for V2_EXTENSION_DATA {
31540    type Message = MavMessage;
31541    const ID: u32 = 248u32;
31542    const NAME: &'static str = "V2_EXTENSION";
31543    const EXTRA_CRC: u8 = 8u8;
31544    const ENCODED_LEN: usize = 254usize;
31545    fn deser(
31546        _version: MavlinkVersion,
31547        __input: &[u8],
31548    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31549        let avail_len = __input.len();
31550        let mut payload_buf = [0; Self::ENCODED_LEN];
31551        let mut buf = if avail_len < Self::ENCODED_LEN {
31552            payload_buf[0..avail_len].copy_from_slice(__input);
31553            Bytes::new(&payload_buf)
31554        } else {
31555            Bytes::new(__input)
31556        };
31557        let mut __struct = Self::default();
31558        __struct.message_type = buf.get_u16_le();
31559        __struct.target_network = buf.get_u8();
31560        __struct.target_system = buf.get_u8();
31561        __struct.target_component = buf.get_u8();
31562        for v in &mut __struct.payload {
31563            let val = buf.get_u8();
31564            *v = val;
31565        }
31566        Ok(__struct)
31567    }
31568    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31569        let mut __tmp = BytesMut::new(bytes);
31570        #[allow(clippy::absurd_extreme_comparisons)]
31571        #[allow(unused_comparisons)]
31572        if __tmp.remaining() < Self::ENCODED_LEN {
31573            panic!(
31574                "buffer is too small (need {} bytes, but got {})",
31575                Self::ENCODED_LEN,
31576                __tmp.remaining(),
31577            )
31578        }
31579        __tmp.put_u16_le(self.message_type);
31580        __tmp.put_u8(self.target_network);
31581        __tmp.put_u8(self.target_system);
31582        __tmp.put_u8(self.target_component);
31583        for val in &self.payload {
31584            __tmp.put_u8(*val);
31585        }
31586        if matches!(version, MavlinkVersion::V2) {
31587            let len = __tmp.len();
31588            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31589        } else {
31590            __tmp.len()
31591        }
31592    }
31593}
31594#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31595#[doc = ""]
31596#[doc = "ID: 74"]
31597#[derive(Debug, Clone, PartialEq)]
31598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31600#[cfg_attr(feature = "ts", derive(TS))]
31601#[cfg_attr(feature = "ts", ts(export))]
31602pub struct VFR_HUD_DATA {
31603    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31604    pub airspeed: f32,
31605    #[doc = "Current ground speed."]
31606    pub groundspeed: f32,
31607    #[doc = "Current altitude (MSL)."]
31608    pub alt: f32,
31609    #[doc = "Current climb rate."]
31610    pub climb: f32,
31611    #[doc = "Current heading in compass units (0-360, 0=north)."]
31612    pub heading: i16,
31613    #[doc = "Current throttle setting (0 to 100)."]
31614    pub throttle: u16,
31615}
31616impl VFR_HUD_DATA {
31617    pub const ENCODED_LEN: usize = 20usize;
31618    pub const DEFAULT: Self = Self {
31619        airspeed: 0.0_f32,
31620        groundspeed: 0.0_f32,
31621        alt: 0.0_f32,
31622        climb: 0.0_f32,
31623        heading: 0_i16,
31624        throttle: 0_u16,
31625    };
31626    #[cfg(feature = "arbitrary")]
31627    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31628        use arbitrary::{Arbitrary, Unstructured};
31629        let mut buf = [0u8; 1024];
31630        rng.fill_bytes(&mut buf);
31631        let mut unstructured = Unstructured::new(&buf);
31632        Self::arbitrary(&mut unstructured).unwrap_or_default()
31633    }
31634}
31635impl Default for VFR_HUD_DATA {
31636    fn default() -> Self {
31637        Self::DEFAULT.clone()
31638    }
31639}
31640impl MessageData for VFR_HUD_DATA {
31641    type Message = MavMessage;
31642    const ID: u32 = 74u32;
31643    const NAME: &'static str = "VFR_HUD";
31644    const EXTRA_CRC: u8 = 20u8;
31645    const ENCODED_LEN: usize = 20usize;
31646    fn deser(
31647        _version: MavlinkVersion,
31648        __input: &[u8],
31649    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31650        let avail_len = __input.len();
31651        let mut payload_buf = [0; Self::ENCODED_LEN];
31652        let mut buf = if avail_len < Self::ENCODED_LEN {
31653            payload_buf[0..avail_len].copy_from_slice(__input);
31654            Bytes::new(&payload_buf)
31655        } else {
31656            Bytes::new(__input)
31657        };
31658        let mut __struct = Self::default();
31659        __struct.airspeed = buf.get_f32_le();
31660        __struct.groundspeed = buf.get_f32_le();
31661        __struct.alt = buf.get_f32_le();
31662        __struct.climb = buf.get_f32_le();
31663        __struct.heading = buf.get_i16_le();
31664        __struct.throttle = buf.get_u16_le();
31665        Ok(__struct)
31666    }
31667    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31668        let mut __tmp = BytesMut::new(bytes);
31669        #[allow(clippy::absurd_extreme_comparisons)]
31670        #[allow(unused_comparisons)]
31671        if __tmp.remaining() < Self::ENCODED_LEN {
31672            panic!(
31673                "buffer is too small (need {} bytes, but got {})",
31674                Self::ENCODED_LEN,
31675                __tmp.remaining(),
31676            )
31677        }
31678        __tmp.put_f32_le(self.airspeed);
31679        __tmp.put_f32_le(self.groundspeed);
31680        __tmp.put_f32_le(self.alt);
31681        __tmp.put_f32_le(self.climb);
31682        __tmp.put_i16_le(self.heading);
31683        __tmp.put_u16_le(self.throttle);
31684        if matches!(version, MavlinkVersion::V2) {
31685            let len = __tmp.len();
31686            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31687        } else {
31688            __tmp.len()
31689        }
31690    }
31691}
31692#[doc = "Vibration levels and accelerometer clipping."]
31693#[doc = ""]
31694#[doc = "ID: 241"]
31695#[derive(Debug, Clone, PartialEq)]
31696#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31697#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31698#[cfg_attr(feature = "ts", derive(TS))]
31699#[cfg_attr(feature = "ts", ts(export))]
31700pub struct VIBRATION_DATA {
31701    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31702    pub time_usec: u64,
31703    #[doc = "Vibration levels on X-axis"]
31704    pub vibration_x: f32,
31705    #[doc = "Vibration levels on Y-axis"]
31706    pub vibration_y: f32,
31707    #[doc = "Vibration levels on Z-axis"]
31708    pub vibration_z: f32,
31709    #[doc = "first accelerometer clipping count"]
31710    pub clipping_0: u32,
31711    #[doc = "second accelerometer clipping count"]
31712    pub clipping_1: u32,
31713    #[doc = "third accelerometer clipping count"]
31714    pub clipping_2: u32,
31715}
31716impl VIBRATION_DATA {
31717    pub const ENCODED_LEN: usize = 32usize;
31718    pub const DEFAULT: Self = Self {
31719        time_usec: 0_u64,
31720        vibration_x: 0.0_f32,
31721        vibration_y: 0.0_f32,
31722        vibration_z: 0.0_f32,
31723        clipping_0: 0_u32,
31724        clipping_1: 0_u32,
31725        clipping_2: 0_u32,
31726    };
31727    #[cfg(feature = "arbitrary")]
31728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31729        use arbitrary::{Arbitrary, Unstructured};
31730        let mut buf = [0u8; 1024];
31731        rng.fill_bytes(&mut buf);
31732        let mut unstructured = Unstructured::new(&buf);
31733        Self::arbitrary(&mut unstructured).unwrap_or_default()
31734    }
31735}
31736impl Default for VIBRATION_DATA {
31737    fn default() -> Self {
31738        Self::DEFAULT.clone()
31739    }
31740}
31741impl MessageData for VIBRATION_DATA {
31742    type Message = MavMessage;
31743    const ID: u32 = 241u32;
31744    const NAME: &'static str = "VIBRATION";
31745    const EXTRA_CRC: u8 = 90u8;
31746    const ENCODED_LEN: usize = 32usize;
31747    fn deser(
31748        _version: MavlinkVersion,
31749        __input: &[u8],
31750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31751        let avail_len = __input.len();
31752        let mut payload_buf = [0; Self::ENCODED_LEN];
31753        let mut buf = if avail_len < Self::ENCODED_LEN {
31754            payload_buf[0..avail_len].copy_from_slice(__input);
31755            Bytes::new(&payload_buf)
31756        } else {
31757            Bytes::new(__input)
31758        };
31759        let mut __struct = Self::default();
31760        __struct.time_usec = buf.get_u64_le();
31761        __struct.vibration_x = buf.get_f32_le();
31762        __struct.vibration_y = buf.get_f32_le();
31763        __struct.vibration_z = buf.get_f32_le();
31764        __struct.clipping_0 = buf.get_u32_le();
31765        __struct.clipping_1 = buf.get_u32_le();
31766        __struct.clipping_2 = buf.get_u32_le();
31767        Ok(__struct)
31768    }
31769    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31770        let mut __tmp = BytesMut::new(bytes);
31771        #[allow(clippy::absurd_extreme_comparisons)]
31772        #[allow(unused_comparisons)]
31773        if __tmp.remaining() < Self::ENCODED_LEN {
31774            panic!(
31775                "buffer is too small (need {} bytes, but got {})",
31776                Self::ENCODED_LEN,
31777                __tmp.remaining(),
31778            )
31779        }
31780        __tmp.put_u64_le(self.time_usec);
31781        __tmp.put_f32_le(self.vibration_x);
31782        __tmp.put_f32_le(self.vibration_y);
31783        __tmp.put_f32_le(self.vibration_z);
31784        __tmp.put_u32_le(self.clipping_0);
31785        __tmp.put_u32_le(self.clipping_1);
31786        __tmp.put_u32_le(self.clipping_2);
31787        if matches!(version, MavlinkVersion::V2) {
31788            let len = __tmp.len();
31789            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31790        } else {
31791            __tmp.len()
31792        }
31793    }
31794}
31795#[doc = "Global position estimate from a Vicon motion system source."]
31796#[doc = ""]
31797#[doc = "ID: 104"]
31798#[derive(Debug, Clone, PartialEq)]
31799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31801#[cfg_attr(feature = "ts", derive(TS))]
31802#[cfg_attr(feature = "ts", ts(export))]
31803pub struct VICON_POSITION_ESTIMATE_DATA {
31804    #[doc = "Timestamp (UNIX time or time since system boot)"]
31805    pub usec: u64,
31806    #[doc = "Global X position"]
31807    pub x: f32,
31808    #[doc = "Global Y position"]
31809    pub y: f32,
31810    #[doc = "Global Z position"]
31811    pub z: f32,
31812    #[doc = "Roll angle"]
31813    pub roll: f32,
31814    #[doc = "Pitch angle"]
31815    pub pitch: f32,
31816    #[doc = "Yaw angle"]
31817    pub yaw: f32,
31818    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31819    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31820    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31821    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31822    pub covariance: [f32; 21],
31823}
31824impl VICON_POSITION_ESTIMATE_DATA {
31825    pub const ENCODED_LEN: usize = 116usize;
31826    pub const DEFAULT: Self = Self {
31827        usec: 0_u64,
31828        x: 0.0_f32,
31829        y: 0.0_f32,
31830        z: 0.0_f32,
31831        roll: 0.0_f32,
31832        pitch: 0.0_f32,
31833        yaw: 0.0_f32,
31834        covariance: [0.0_f32; 21usize],
31835    };
31836    #[cfg(feature = "arbitrary")]
31837    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31838        use arbitrary::{Arbitrary, Unstructured};
31839        let mut buf = [0u8; 1024];
31840        rng.fill_bytes(&mut buf);
31841        let mut unstructured = Unstructured::new(&buf);
31842        Self::arbitrary(&mut unstructured).unwrap_or_default()
31843    }
31844}
31845impl Default for VICON_POSITION_ESTIMATE_DATA {
31846    fn default() -> Self {
31847        Self::DEFAULT.clone()
31848    }
31849}
31850impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31851    type Message = MavMessage;
31852    const ID: u32 = 104u32;
31853    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31854    const EXTRA_CRC: u8 = 56u8;
31855    const ENCODED_LEN: usize = 116usize;
31856    fn deser(
31857        _version: MavlinkVersion,
31858        __input: &[u8],
31859    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31860        let avail_len = __input.len();
31861        let mut payload_buf = [0; Self::ENCODED_LEN];
31862        let mut buf = if avail_len < Self::ENCODED_LEN {
31863            payload_buf[0..avail_len].copy_from_slice(__input);
31864            Bytes::new(&payload_buf)
31865        } else {
31866            Bytes::new(__input)
31867        };
31868        let mut __struct = Self::default();
31869        __struct.usec = buf.get_u64_le();
31870        __struct.x = buf.get_f32_le();
31871        __struct.y = buf.get_f32_le();
31872        __struct.z = buf.get_f32_le();
31873        __struct.roll = buf.get_f32_le();
31874        __struct.pitch = buf.get_f32_le();
31875        __struct.yaw = buf.get_f32_le();
31876        for v in &mut __struct.covariance {
31877            let val = buf.get_f32_le();
31878            *v = val;
31879        }
31880        Ok(__struct)
31881    }
31882    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31883        let mut __tmp = BytesMut::new(bytes);
31884        #[allow(clippy::absurd_extreme_comparisons)]
31885        #[allow(unused_comparisons)]
31886        if __tmp.remaining() < Self::ENCODED_LEN {
31887            panic!(
31888                "buffer is too small (need {} bytes, but got {})",
31889                Self::ENCODED_LEN,
31890                __tmp.remaining(),
31891            )
31892        }
31893        __tmp.put_u64_le(self.usec);
31894        __tmp.put_f32_le(self.x);
31895        __tmp.put_f32_le(self.y);
31896        __tmp.put_f32_le(self.z);
31897        __tmp.put_f32_le(self.roll);
31898        __tmp.put_f32_le(self.pitch);
31899        __tmp.put_f32_le(self.yaw);
31900        if matches!(version, MavlinkVersion::V2) {
31901            for val in &self.covariance {
31902                __tmp.put_f32_le(*val);
31903            }
31904            let len = __tmp.len();
31905            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31906        } else {
31907            __tmp.len()
31908        }
31909    }
31910}
31911#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31912#[doc = ""]
31913#[doc = "ID: 269"]
31914#[derive(Debug, Clone, PartialEq)]
31915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31916#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31917#[cfg_attr(feature = "ts", derive(TS))]
31918#[cfg_attr(feature = "ts", ts(export))]
31919pub struct VIDEO_STREAM_INFORMATION_DATA {
31920    #[doc = "Frame rate."]
31921    pub framerate: f32,
31922    #[doc = "Bit rate."]
31923    pub bitrate: u32,
31924    #[doc = "Bitmap of stream status flags."]
31925    pub flags: VideoStreamStatusFlags,
31926    #[doc = "Horizontal resolution."]
31927    pub resolution_h: u16,
31928    #[doc = "Vertical resolution."]
31929    pub resolution_v: u16,
31930    #[doc = "Video image rotation clockwise."]
31931    pub rotation: u16,
31932    #[doc = "Horizontal Field of view."]
31933    pub hfov: u16,
31934    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31935    pub stream_id: u8,
31936    #[doc = "Number of streams available."]
31937    pub count: u8,
31938    #[doc = "Type of stream."]
31939    pub mavtype: VideoStreamType,
31940    #[doc = "Stream name."]
31941    #[cfg_attr(
31942        feature = "serde",
31943        serde(
31944            serialize_with = "crate::nulstr::serialize::<_, 32>",
31945            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
31946        )
31947    )]
31948    #[cfg_attr(feature = "ts", ts(type = "string"))]
31949    pub name: [u8; 32],
31950    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31951    #[cfg_attr(
31952        feature = "serde",
31953        serde(
31954            serialize_with = "crate::nulstr::serialize::<_, 160>",
31955            deserialize_with = "crate::nulstr::deserialize::<_, 160>"
31956        )
31957    )]
31958    #[cfg_attr(feature = "ts", ts(type = "string"))]
31959    pub uri: [u8; 160],
31960    #[doc = "Encoding of stream."]
31961    #[cfg_attr(feature = "serde", serde(default))]
31962    pub encoding: VideoStreamEncoding,
31963    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31964    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31965    pub camera_device_id: u8,
31966}
31967impl VIDEO_STREAM_INFORMATION_DATA {
31968    pub const ENCODED_LEN: usize = 215usize;
31969    pub const DEFAULT: Self = Self {
31970        framerate: 0.0_f32,
31971        bitrate: 0_u32,
31972        flags: VideoStreamStatusFlags::DEFAULT,
31973        resolution_h: 0_u16,
31974        resolution_v: 0_u16,
31975        rotation: 0_u16,
31976        hfov: 0_u16,
31977        stream_id: 0_u8,
31978        count: 0_u8,
31979        mavtype: VideoStreamType::DEFAULT,
31980        name: [0_u8; 32usize],
31981        uri: [0_u8; 160usize],
31982        encoding: VideoStreamEncoding::DEFAULT,
31983        camera_device_id: 0_u8,
31984    };
31985    #[cfg(feature = "arbitrary")]
31986    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31987        use arbitrary::{Arbitrary, Unstructured};
31988        let mut buf = [0u8; 1024];
31989        rng.fill_bytes(&mut buf);
31990        let mut unstructured = Unstructured::new(&buf);
31991        Self::arbitrary(&mut unstructured).unwrap_or_default()
31992    }
31993}
31994impl Default for VIDEO_STREAM_INFORMATION_DATA {
31995    fn default() -> Self {
31996        Self::DEFAULT.clone()
31997    }
31998}
31999impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
32000    type Message = MavMessage;
32001    const ID: u32 = 269u32;
32002    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
32003    const EXTRA_CRC: u8 = 109u8;
32004    const ENCODED_LEN: usize = 215usize;
32005    fn deser(
32006        _version: MavlinkVersion,
32007        __input: &[u8],
32008    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32009        let avail_len = __input.len();
32010        let mut payload_buf = [0; Self::ENCODED_LEN];
32011        let mut buf = if avail_len < Self::ENCODED_LEN {
32012            payload_buf[0..avail_len].copy_from_slice(__input);
32013            Bytes::new(&payload_buf)
32014        } else {
32015            Bytes::new(__input)
32016        };
32017        let mut __struct = Self::default();
32018        __struct.framerate = buf.get_f32_le();
32019        __struct.bitrate = buf.get_u32_le();
32020        let tmp = buf.get_u16_le();
32021        __struct.flags = VideoStreamStatusFlags::from_bits(
32022            tmp & VideoStreamStatusFlags::all().bits(),
32023        )
32024        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32025            flag_type: "VideoStreamStatusFlags",
32026            value: tmp as u32,
32027        })?;
32028        __struct.resolution_h = buf.get_u16_le();
32029        __struct.resolution_v = buf.get_u16_le();
32030        __struct.rotation = buf.get_u16_le();
32031        __struct.hfov = buf.get_u16_le();
32032        __struct.stream_id = buf.get_u8();
32033        __struct.count = buf.get_u8();
32034        let tmp = buf.get_u8();
32035        __struct.mavtype =
32036            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32037                enum_type: "VideoStreamType",
32038                value: tmp as u32,
32039            })?;
32040        for v in &mut __struct.name {
32041            let val = buf.get_u8();
32042            *v = val;
32043        }
32044        for v in &mut __struct.uri {
32045            let val = buf.get_u8();
32046            *v = val;
32047        }
32048        let tmp = buf.get_u8();
32049        __struct.encoding =
32050            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32051                enum_type: "VideoStreamEncoding",
32052                value: tmp as u32,
32053            })?;
32054        __struct.camera_device_id = buf.get_u8();
32055        Ok(__struct)
32056    }
32057    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32058        let mut __tmp = BytesMut::new(bytes);
32059        #[allow(clippy::absurd_extreme_comparisons)]
32060        #[allow(unused_comparisons)]
32061        if __tmp.remaining() < Self::ENCODED_LEN {
32062            panic!(
32063                "buffer is too small (need {} bytes, but got {})",
32064                Self::ENCODED_LEN,
32065                __tmp.remaining(),
32066            )
32067        }
32068        __tmp.put_f32_le(self.framerate);
32069        __tmp.put_u32_le(self.bitrate);
32070        __tmp.put_u16_le(self.flags.bits());
32071        __tmp.put_u16_le(self.resolution_h);
32072        __tmp.put_u16_le(self.resolution_v);
32073        __tmp.put_u16_le(self.rotation);
32074        __tmp.put_u16_le(self.hfov);
32075        __tmp.put_u8(self.stream_id);
32076        __tmp.put_u8(self.count);
32077        __tmp.put_u8(self.mavtype as u8);
32078        for val in &self.name {
32079            __tmp.put_u8(*val);
32080        }
32081        for val in &self.uri {
32082            __tmp.put_u8(*val);
32083        }
32084        if matches!(version, MavlinkVersion::V2) {
32085            __tmp.put_u8(self.encoding as u8);
32086            __tmp.put_u8(self.camera_device_id);
32087            let len = __tmp.len();
32088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32089        } else {
32090            __tmp.len()
32091        }
32092    }
32093}
32094#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
32095#[doc = ""]
32096#[doc = "ID: 270"]
32097#[derive(Debug, Clone, PartialEq)]
32098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32100#[cfg_attr(feature = "ts", derive(TS))]
32101#[cfg_attr(feature = "ts", ts(export))]
32102pub struct VIDEO_STREAM_STATUS_DATA {
32103    #[doc = "Frame rate"]
32104    pub framerate: f32,
32105    #[doc = "Bit rate"]
32106    pub bitrate: u32,
32107    #[doc = "Bitmap of stream status flags"]
32108    pub flags: VideoStreamStatusFlags,
32109    #[doc = "Horizontal resolution"]
32110    pub resolution_h: u16,
32111    #[doc = "Vertical resolution"]
32112    pub resolution_v: u16,
32113    #[doc = "Video image rotation clockwise"]
32114    pub rotation: u16,
32115    #[doc = "Horizontal Field of view"]
32116    pub hfov: u16,
32117    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32118    pub stream_id: u8,
32119    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32120    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32121    pub camera_device_id: u8,
32122}
32123impl VIDEO_STREAM_STATUS_DATA {
32124    pub const ENCODED_LEN: usize = 20usize;
32125    pub const DEFAULT: Self = Self {
32126        framerate: 0.0_f32,
32127        bitrate: 0_u32,
32128        flags: VideoStreamStatusFlags::DEFAULT,
32129        resolution_h: 0_u16,
32130        resolution_v: 0_u16,
32131        rotation: 0_u16,
32132        hfov: 0_u16,
32133        stream_id: 0_u8,
32134        camera_device_id: 0_u8,
32135    };
32136    #[cfg(feature = "arbitrary")]
32137    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32138        use arbitrary::{Arbitrary, Unstructured};
32139        let mut buf = [0u8; 1024];
32140        rng.fill_bytes(&mut buf);
32141        let mut unstructured = Unstructured::new(&buf);
32142        Self::arbitrary(&mut unstructured).unwrap_or_default()
32143    }
32144}
32145impl Default for VIDEO_STREAM_STATUS_DATA {
32146    fn default() -> Self {
32147        Self::DEFAULT.clone()
32148    }
32149}
32150impl MessageData for VIDEO_STREAM_STATUS_DATA {
32151    type Message = MavMessage;
32152    const ID: u32 = 270u32;
32153    const NAME: &'static str = "VIDEO_STREAM_STATUS";
32154    const EXTRA_CRC: u8 = 59u8;
32155    const ENCODED_LEN: usize = 20usize;
32156    fn deser(
32157        _version: MavlinkVersion,
32158        __input: &[u8],
32159    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32160        let avail_len = __input.len();
32161        let mut payload_buf = [0; Self::ENCODED_LEN];
32162        let mut buf = if avail_len < Self::ENCODED_LEN {
32163            payload_buf[0..avail_len].copy_from_slice(__input);
32164            Bytes::new(&payload_buf)
32165        } else {
32166            Bytes::new(__input)
32167        };
32168        let mut __struct = Self::default();
32169        __struct.framerate = buf.get_f32_le();
32170        __struct.bitrate = buf.get_u32_le();
32171        let tmp = buf.get_u16_le();
32172        __struct.flags = VideoStreamStatusFlags::from_bits(
32173            tmp & VideoStreamStatusFlags::all().bits(),
32174        )
32175        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32176            flag_type: "VideoStreamStatusFlags",
32177            value: tmp as u32,
32178        })?;
32179        __struct.resolution_h = buf.get_u16_le();
32180        __struct.resolution_v = buf.get_u16_le();
32181        __struct.rotation = buf.get_u16_le();
32182        __struct.hfov = buf.get_u16_le();
32183        __struct.stream_id = buf.get_u8();
32184        __struct.camera_device_id = buf.get_u8();
32185        Ok(__struct)
32186    }
32187    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32188        let mut __tmp = BytesMut::new(bytes);
32189        #[allow(clippy::absurd_extreme_comparisons)]
32190        #[allow(unused_comparisons)]
32191        if __tmp.remaining() < Self::ENCODED_LEN {
32192            panic!(
32193                "buffer is too small (need {} bytes, but got {})",
32194                Self::ENCODED_LEN,
32195                __tmp.remaining(),
32196            )
32197        }
32198        __tmp.put_f32_le(self.framerate);
32199        __tmp.put_u32_le(self.bitrate);
32200        __tmp.put_u16_le(self.flags.bits());
32201        __tmp.put_u16_le(self.resolution_h);
32202        __tmp.put_u16_le(self.resolution_v);
32203        __tmp.put_u16_le(self.rotation);
32204        __tmp.put_u16_le(self.hfov);
32205        __tmp.put_u8(self.stream_id);
32206        if matches!(version, MavlinkVersion::V2) {
32207            __tmp.put_u8(self.camera_device_id);
32208            let len = __tmp.len();
32209            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32210        } else {
32211            __tmp.len()
32212        }
32213    }
32214}
32215#[doc = "Local position/attitude estimate from a vision source."]
32216#[doc = ""]
32217#[doc = "ID: 102"]
32218#[derive(Debug, Clone, PartialEq)]
32219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32221#[cfg_attr(feature = "ts", derive(TS))]
32222#[cfg_attr(feature = "ts", ts(export))]
32223pub struct VISION_POSITION_ESTIMATE_DATA {
32224    #[doc = "Timestamp (UNIX time or time since system boot)"]
32225    pub usec: u64,
32226    #[doc = "Local X position"]
32227    pub x: f32,
32228    #[doc = "Local Y position"]
32229    pub y: f32,
32230    #[doc = "Local Z position"]
32231    pub z: f32,
32232    #[doc = "Roll angle"]
32233    pub roll: f32,
32234    #[doc = "Pitch angle"]
32235    pub pitch: f32,
32236    #[doc = "Yaw angle"]
32237    pub yaw: f32,
32238    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
32239    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32240    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32241    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32242    pub covariance: [f32; 21],
32243    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
32244    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32245    pub reset_counter: u8,
32246}
32247impl VISION_POSITION_ESTIMATE_DATA {
32248    pub const ENCODED_LEN: usize = 117usize;
32249    pub const DEFAULT: Self = Self {
32250        usec: 0_u64,
32251        x: 0.0_f32,
32252        y: 0.0_f32,
32253        z: 0.0_f32,
32254        roll: 0.0_f32,
32255        pitch: 0.0_f32,
32256        yaw: 0.0_f32,
32257        covariance: [0.0_f32; 21usize],
32258        reset_counter: 0_u8,
32259    };
32260    #[cfg(feature = "arbitrary")]
32261    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32262        use arbitrary::{Arbitrary, Unstructured};
32263        let mut buf = [0u8; 1024];
32264        rng.fill_bytes(&mut buf);
32265        let mut unstructured = Unstructured::new(&buf);
32266        Self::arbitrary(&mut unstructured).unwrap_or_default()
32267    }
32268}
32269impl Default for VISION_POSITION_ESTIMATE_DATA {
32270    fn default() -> Self {
32271        Self::DEFAULT.clone()
32272    }
32273}
32274impl MessageData for VISION_POSITION_ESTIMATE_DATA {
32275    type Message = MavMessage;
32276    const ID: u32 = 102u32;
32277    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
32278    const EXTRA_CRC: u8 = 158u8;
32279    const ENCODED_LEN: usize = 117usize;
32280    fn deser(
32281        _version: MavlinkVersion,
32282        __input: &[u8],
32283    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32284        let avail_len = __input.len();
32285        let mut payload_buf = [0; Self::ENCODED_LEN];
32286        let mut buf = if avail_len < Self::ENCODED_LEN {
32287            payload_buf[0..avail_len].copy_from_slice(__input);
32288            Bytes::new(&payload_buf)
32289        } else {
32290            Bytes::new(__input)
32291        };
32292        let mut __struct = Self::default();
32293        __struct.usec = buf.get_u64_le();
32294        __struct.x = buf.get_f32_le();
32295        __struct.y = buf.get_f32_le();
32296        __struct.z = buf.get_f32_le();
32297        __struct.roll = buf.get_f32_le();
32298        __struct.pitch = buf.get_f32_le();
32299        __struct.yaw = buf.get_f32_le();
32300        for v in &mut __struct.covariance {
32301            let val = buf.get_f32_le();
32302            *v = val;
32303        }
32304        __struct.reset_counter = buf.get_u8();
32305        Ok(__struct)
32306    }
32307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32308        let mut __tmp = BytesMut::new(bytes);
32309        #[allow(clippy::absurd_extreme_comparisons)]
32310        #[allow(unused_comparisons)]
32311        if __tmp.remaining() < Self::ENCODED_LEN {
32312            panic!(
32313                "buffer is too small (need {} bytes, but got {})",
32314                Self::ENCODED_LEN,
32315                __tmp.remaining(),
32316            )
32317        }
32318        __tmp.put_u64_le(self.usec);
32319        __tmp.put_f32_le(self.x);
32320        __tmp.put_f32_le(self.y);
32321        __tmp.put_f32_le(self.z);
32322        __tmp.put_f32_le(self.roll);
32323        __tmp.put_f32_le(self.pitch);
32324        __tmp.put_f32_le(self.yaw);
32325        if matches!(version, MavlinkVersion::V2) {
32326            for val in &self.covariance {
32327                __tmp.put_f32_le(*val);
32328            }
32329            __tmp.put_u8(self.reset_counter);
32330            let len = __tmp.len();
32331            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32332        } else {
32333            __tmp.len()
32334        }
32335    }
32336}
32337#[doc = "Speed estimate from a vision source."]
32338#[doc = ""]
32339#[doc = "ID: 103"]
32340#[derive(Debug, Clone, PartialEq)]
32341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32343#[cfg_attr(feature = "ts", derive(TS))]
32344#[cfg_attr(feature = "ts", ts(export))]
32345pub struct VISION_SPEED_ESTIMATE_DATA {
32346    #[doc = "Timestamp (UNIX time or time since system boot)"]
32347    pub usec: u64,
32348    #[doc = "Global X speed"]
32349    pub x: f32,
32350    #[doc = "Global Y speed"]
32351    pub y: f32,
32352    #[doc = "Global Z speed"]
32353    pub z: f32,
32354    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
32355    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32356    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32357    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32358    pub covariance: [f32; 9],
32359    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
32360    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32361    pub reset_counter: u8,
32362}
32363impl VISION_SPEED_ESTIMATE_DATA {
32364    pub const ENCODED_LEN: usize = 57usize;
32365    pub const DEFAULT: Self = Self {
32366        usec: 0_u64,
32367        x: 0.0_f32,
32368        y: 0.0_f32,
32369        z: 0.0_f32,
32370        covariance: [0.0_f32; 9usize],
32371        reset_counter: 0_u8,
32372    };
32373    #[cfg(feature = "arbitrary")]
32374    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32375        use arbitrary::{Arbitrary, Unstructured};
32376        let mut buf = [0u8; 1024];
32377        rng.fill_bytes(&mut buf);
32378        let mut unstructured = Unstructured::new(&buf);
32379        Self::arbitrary(&mut unstructured).unwrap_or_default()
32380    }
32381}
32382impl Default for VISION_SPEED_ESTIMATE_DATA {
32383    fn default() -> Self {
32384        Self::DEFAULT.clone()
32385    }
32386}
32387impl MessageData for VISION_SPEED_ESTIMATE_DATA {
32388    type Message = MavMessage;
32389    const ID: u32 = 103u32;
32390    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
32391    const EXTRA_CRC: u8 = 208u8;
32392    const ENCODED_LEN: usize = 57usize;
32393    fn deser(
32394        _version: MavlinkVersion,
32395        __input: &[u8],
32396    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32397        let avail_len = __input.len();
32398        let mut payload_buf = [0; Self::ENCODED_LEN];
32399        let mut buf = if avail_len < Self::ENCODED_LEN {
32400            payload_buf[0..avail_len].copy_from_slice(__input);
32401            Bytes::new(&payload_buf)
32402        } else {
32403            Bytes::new(__input)
32404        };
32405        let mut __struct = Self::default();
32406        __struct.usec = buf.get_u64_le();
32407        __struct.x = buf.get_f32_le();
32408        __struct.y = buf.get_f32_le();
32409        __struct.z = buf.get_f32_le();
32410        for v in &mut __struct.covariance {
32411            let val = buf.get_f32_le();
32412            *v = val;
32413        }
32414        __struct.reset_counter = buf.get_u8();
32415        Ok(__struct)
32416    }
32417    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32418        let mut __tmp = BytesMut::new(bytes);
32419        #[allow(clippy::absurd_extreme_comparisons)]
32420        #[allow(unused_comparisons)]
32421        if __tmp.remaining() < Self::ENCODED_LEN {
32422            panic!(
32423                "buffer is too small (need {} bytes, but got {})",
32424                Self::ENCODED_LEN,
32425                __tmp.remaining(),
32426            )
32427        }
32428        __tmp.put_u64_le(self.usec);
32429        __tmp.put_f32_le(self.x);
32430        __tmp.put_f32_le(self.y);
32431        __tmp.put_f32_le(self.z);
32432        if matches!(version, MavlinkVersion::V2) {
32433            for val in &self.covariance {
32434                __tmp.put_f32_le(*val);
32435            }
32436            __tmp.put_u8(self.reset_counter);
32437            let len = __tmp.len();
32438            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32439        } else {
32440            __tmp.len()
32441        }
32442    }
32443}
32444#[doc = "Cumulative distance traveled for each reported wheel."]
32445#[doc = ""]
32446#[doc = "ID: 9000"]
32447#[derive(Debug, Clone, PartialEq)]
32448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32450#[cfg_attr(feature = "ts", derive(TS))]
32451#[cfg_attr(feature = "ts", ts(export))]
32452pub struct WHEEL_DISTANCE_DATA {
32453    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32454    pub time_usec: u64,
32455    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32456    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32457    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32458    pub distance: [f64; 16],
32459    #[doc = "Number of wheels reported."]
32460    pub count: u8,
32461}
32462impl WHEEL_DISTANCE_DATA {
32463    pub const ENCODED_LEN: usize = 137usize;
32464    pub const DEFAULT: Self = Self {
32465        time_usec: 0_u64,
32466        distance: [0.0_f64; 16usize],
32467        count: 0_u8,
32468    };
32469    #[cfg(feature = "arbitrary")]
32470    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32471        use arbitrary::{Arbitrary, Unstructured};
32472        let mut buf = [0u8; 1024];
32473        rng.fill_bytes(&mut buf);
32474        let mut unstructured = Unstructured::new(&buf);
32475        Self::arbitrary(&mut unstructured).unwrap_or_default()
32476    }
32477}
32478impl Default for WHEEL_DISTANCE_DATA {
32479    fn default() -> Self {
32480        Self::DEFAULT.clone()
32481    }
32482}
32483impl MessageData for WHEEL_DISTANCE_DATA {
32484    type Message = MavMessage;
32485    const ID: u32 = 9000u32;
32486    const NAME: &'static str = "WHEEL_DISTANCE";
32487    const EXTRA_CRC: u8 = 113u8;
32488    const ENCODED_LEN: usize = 137usize;
32489    fn deser(
32490        _version: MavlinkVersion,
32491        __input: &[u8],
32492    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32493        let avail_len = __input.len();
32494        let mut payload_buf = [0; Self::ENCODED_LEN];
32495        let mut buf = if avail_len < Self::ENCODED_LEN {
32496            payload_buf[0..avail_len].copy_from_slice(__input);
32497            Bytes::new(&payload_buf)
32498        } else {
32499            Bytes::new(__input)
32500        };
32501        let mut __struct = Self::default();
32502        __struct.time_usec = buf.get_u64_le();
32503        for v in &mut __struct.distance {
32504            let val = buf.get_f64_le();
32505            *v = val;
32506        }
32507        __struct.count = buf.get_u8();
32508        Ok(__struct)
32509    }
32510    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32511        let mut __tmp = BytesMut::new(bytes);
32512        #[allow(clippy::absurd_extreme_comparisons)]
32513        #[allow(unused_comparisons)]
32514        if __tmp.remaining() < Self::ENCODED_LEN {
32515            panic!(
32516                "buffer is too small (need {} bytes, but got {})",
32517                Self::ENCODED_LEN,
32518                __tmp.remaining(),
32519            )
32520        }
32521        __tmp.put_u64_le(self.time_usec);
32522        for val in &self.distance {
32523            __tmp.put_f64_le(*val);
32524        }
32525        __tmp.put_u8(self.count);
32526        if matches!(version, MavlinkVersion::V2) {
32527            let len = __tmp.len();
32528            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32529        } else {
32530            __tmp.len()
32531        }
32532    }
32533}
32534#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32535#[doc = ""]
32536#[doc = "ID: 299"]
32537#[derive(Debug, Clone, PartialEq)]
32538#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32539#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32540#[cfg_attr(feature = "ts", derive(TS))]
32541#[cfg_attr(feature = "ts", ts(export))]
32542pub struct WIFI_CONFIG_AP_DATA {
32543    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32544    #[cfg_attr(
32545        feature = "serde",
32546        serde(
32547            serialize_with = "crate::nulstr::serialize::<_, 32>",
32548            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
32549        )
32550    )]
32551    #[cfg_attr(feature = "ts", ts(type = "string"))]
32552    pub ssid: [u8; 32],
32553    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32554    #[cfg_attr(
32555        feature = "serde",
32556        serde(
32557            serialize_with = "crate::nulstr::serialize::<_, 64>",
32558            deserialize_with = "crate::nulstr::deserialize::<_, 64>"
32559        )
32560    )]
32561    #[cfg_attr(feature = "ts", ts(type = "string"))]
32562    pub password: [u8; 64],
32563    #[doc = "WiFi Mode."]
32564    #[cfg_attr(feature = "serde", serde(default))]
32565    pub mode: WifiConfigApMode,
32566    #[doc = "Message acceptance response (sent back to GS)."]
32567    #[cfg_attr(feature = "serde", serde(default))]
32568    pub response: WifiConfigApResponse,
32569}
32570impl WIFI_CONFIG_AP_DATA {
32571    pub const ENCODED_LEN: usize = 98usize;
32572    pub const DEFAULT: Self = Self {
32573        ssid: [0_u8; 32usize],
32574        password: [0_u8; 64usize],
32575        mode: WifiConfigApMode::DEFAULT,
32576        response: WifiConfigApResponse::DEFAULT,
32577    };
32578    #[cfg(feature = "arbitrary")]
32579    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32580        use arbitrary::{Arbitrary, Unstructured};
32581        let mut buf = [0u8; 1024];
32582        rng.fill_bytes(&mut buf);
32583        let mut unstructured = Unstructured::new(&buf);
32584        Self::arbitrary(&mut unstructured).unwrap_or_default()
32585    }
32586}
32587impl Default for WIFI_CONFIG_AP_DATA {
32588    fn default() -> Self {
32589        Self::DEFAULT.clone()
32590    }
32591}
32592impl MessageData for WIFI_CONFIG_AP_DATA {
32593    type Message = MavMessage;
32594    const ID: u32 = 299u32;
32595    const NAME: &'static str = "WIFI_CONFIG_AP";
32596    const EXTRA_CRC: u8 = 19u8;
32597    const ENCODED_LEN: usize = 98usize;
32598    fn deser(
32599        _version: MavlinkVersion,
32600        __input: &[u8],
32601    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32602        let avail_len = __input.len();
32603        let mut payload_buf = [0; Self::ENCODED_LEN];
32604        let mut buf = if avail_len < Self::ENCODED_LEN {
32605            payload_buf[0..avail_len].copy_from_slice(__input);
32606            Bytes::new(&payload_buf)
32607        } else {
32608            Bytes::new(__input)
32609        };
32610        let mut __struct = Self::default();
32611        for v in &mut __struct.ssid {
32612            let val = buf.get_u8();
32613            *v = val;
32614        }
32615        for v in &mut __struct.password {
32616            let val = buf.get_u8();
32617            *v = val;
32618        }
32619        let tmp = buf.get_i8();
32620        __struct.mode =
32621            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32622                enum_type: "WifiConfigApMode",
32623                value: tmp as u32,
32624            })?;
32625        let tmp = buf.get_i8();
32626        __struct.response =
32627            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32628                enum_type: "WifiConfigApResponse",
32629                value: tmp as u32,
32630            })?;
32631        Ok(__struct)
32632    }
32633    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32634        let mut __tmp = BytesMut::new(bytes);
32635        #[allow(clippy::absurd_extreme_comparisons)]
32636        #[allow(unused_comparisons)]
32637        if __tmp.remaining() < Self::ENCODED_LEN {
32638            panic!(
32639                "buffer is too small (need {} bytes, but got {})",
32640                Self::ENCODED_LEN,
32641                __tmp.remaining(),
32642            )
32643        }
32644        for val in &self.ssid {
32645            __tmp.put_u8(*val);
32646        }
32647        for val in &self.password {
32648            __tmp.put_u8(*val);
32649        }
32650        if matches!(version, MavlinkVersion::V2) {
32651            __tmp.put_i8(self.mode as i8);
32652            __tmp.put_i8(self.response as i8);
32653            let len = __tmp.len();
32654            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32655        } else {
32656            __tmp.len()
32657        }
32658    }
32659}
32660#[doc = "Winch status."]
32661#[doc = ""]
32662#[doc = "ID: 9005"]
32663#[derive(Debug, Clone, PartialEq)]
32664#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32665#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32666#[cfg_attr(feature = "ts", derive(TS))]
32667#[cfg_attr(feature = "ts", ts(export))]
32668pub struct WINCH_STATUS_DATA {
32669    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32670    pub time_usec: u64,
32671    #[doc = "Length of line released. NaN if unknown"]
32672    pub line_length: f32,
32673    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32674    pub speed: f32,
32675    #[doc = "Tension on the line. NaN if unknown"]
32676    pub tension: f32,
32677    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32678    pub voltage: f32,
32679    #[doc = "Current draw from the winch. NaN if unknown"]
32680    pub current: f32,
32681    #[doc = "Status flags"]
32682    pub status: MavWinchStatusFlag,
32683    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32684    pub temperature: i16,
32685}
32686impl WINCH_STATUS_DATA {
32687    pub const ENCODED_LEN: usize = 34usize;
32688    pub const DEFAULT: Self = Self {
32689        time_usec: 0_u64,
32690        line_length: 0.0_f32,
32691        speed: 0.0_f32,
32692        tension: 0.0_f32,
32693        voltage: 0.0_f32,
32694        current: 0.0_f32,
32695        status: MavWinchStatusFlag::DEFAULT,
32696        temperature: 0_i16,
32697    };
32698    #[cfg(feature = "arbitrary")]
32699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32700        use arbitrary::{Arbitrary, Unstructured};
32701        let mut buf = [0u8; 1024];
32702        rng.fill_bytes(&mut buf);
32703        let mut unstructured = Unstructured::new(&buf);
32704        Self::arbitrary(&mut unstructured).unwrap_or_default()
32705    }
32706}
32707impl Default for WINCH_STATUS_DATA {
32708    fn default() -> Self {
32709        Self::DEFAULT.clone()
32710    }
32711}
32712impl MessageData for WINCH_STATUS_DATA {
32713    type Message = MavMessage;
32714    const ID: u32 = 9005u32;
32715    const NAME: &'static str = "WINCH_STATUS";
32716    const EXTRA_CRC: u8 = 117u8;
32717    const ENCODED_LEN: usize = 34usize;
32718    fn deser(
32719        _version: MavlinkVersion,
32720        __input: &[u8],
32721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32722        let avail_len = __input.len();
32723        let mut payload_buf = [0; Self::ENCODED_LEN];
32724        let mut buf = if avail_len < Self::ENCODED_LEN {
32725            payload_buf[0..avail_len].copy_from_slice(__input);
32726            Bytes::new(&payload_buf)
32727        } else {
32728            Bytes::new(__input)
32729        };
32730        let mut __struct = Self::default();
32731        __struct.time_usec = buf.get_u64_le();
32732        __struct.line_length = buf.get_f32_le();
32733        __struct.speed = buf.get_f32_le();
32734        __struct.tension = buf.get_f32_le();
32735        __struct.voltage = buf.get_f32_le();
32736        __struct.current = buf.get_f32_le();
32737        let tmp = buf.get_u32_le();
32738        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
32739            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32740                flag_type: "MavWinchStatusFlag",
32741                value: tmp as u32,
32742            })?;
32743        __struct.temperature = buf.get_i16_le();
32744        Ok(__struct)
32745    }
32746    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32747        let mut __tmp = BytesMut::new(bytes);
32748        #[allow(clippy::absurd_extreme_comparisons)]
32749        #[allow(unused_comparisons)]
32750        if __tmp.remaining() < Self::ENCODED_LEN {
32751            panic!(
32752                "buffer is too small (need {} bytes, but got {})",
32753                Self::ENCODED_LEN,
32754                __tmp.remaining(),
32755            )
32756        }
32757        __tmp.put_u64_le(self.time_usec);
32758        __tmp.put_f32_le(self.line_length);
32759        __tmp.put_f32_le(self.speed);
32760        __tmp.put_f32_le(self.tension);
32761        __tmp.put_f32_le(self.voltage);
32762        __tmp.put_f32_le(self.current);
32763        __tmp.put_u32_le(self.status.bits());
32764        __tmp.put_i16_le(self.temperature);
32765        if matches!(version, MavlinkVersion::V2) {
32766            let len = __tmp.len();
32767            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32768        } else {
32769            __tmp.len()
32770        }
32771    }
32772}
32773#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
32774#[doc = ""]
32775#[doc = "ID: 231"]
32776#[derive(Debug, Clone, PartialEq)]
32777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32778#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32779#[cfg_attr(feature = "ts", derive(TS))]
32780#[cfg_attr(feature = "ts", ts(export))]
32781pub struct WIND_COV_DATA {
32782    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32783    pub time_usec: u64,
32784    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
32785    pub wind_x: f32,
32786    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
32787    pub wind_y: f32,
32788    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
32789    pub wind_z: f32,
32790    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32791    pub var_horiz: f32,
32792    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32793    pub var_vert: f32,
32794    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
32795    pub wind_alt: f32,
32796    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
32797    pub horiz_accuracy: f32,
32798    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
32799    pub vert_accuracy: f32,
32800}
32801impl WIND_COV_DATA {
32802    pub const ENCODED_LEN: usize = 40usize;
32803    pub const DEFAULT: Self = Self {
32804        time_usec: 0_u64,
32805        wind_x: 0.0_f32,
32806        wind_y: 0.0_f32,
32807        wind_z: 0.0_f32,
32808        var_horiz: 0.0_f32,
32809        var_vert: 0.0_f32,
32810        wind_alt: 0.0_f32,
32811        horiz_accuracy: 0.0_f32,
32812        vert_accuracy: 0.0_f32,
32813    };
32814    #[cfg(feature = "arbitrary")]
32815    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32816        use arbitrary::{Arbitrary, Unstructured};
32817        let mut buf = [0u8; 1024];
32818        rng.fill_bytes(&mut buf);
32819        let mut unstructured = Unstructured::new(&buf);
32820        Self::arbitrary(&mut unstructured).unwrap_or_default()
32821    }
32822}
32823impl Default for WIND_COV_DATA {
32824    fn default() -> Self {
32825        Self::DEFAULT.clone()
32826    }
32827}
32828impl MessageData for WIND_COV_DATA {
32829    type Message = MavMessage;
32830    const ID: u32 = 231u32;
32831    const NAME: &'static str = "WIND_COV";
32832    const EXTRA_CRC: u8 = 105u8;
32833    const ENCODED_LEN: usize = 40usize;
32834    fn deser(
32835        _version: MavlinkVersion,
32836        __input: &[u8],
32837    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32838        let avail_len = __input.len();
32839        let mut payload_buf = [0; Self::ENCODED_LEN];
32840        let mut buf = if avail_len < Self::ENCODED_LEN {
32841            payload_buf[0..avail_len].copy_from_slice(__input);
32842            Bytes::new(&payload_buf)
32843        } else {
32844            Bytes::new(__input)
32845        };
32846        let mut __struct = Self::default();
32847        __struct.time_usec = buf.get_u64_le();
32848        __struct.wind_x = buf.get_f32_le();
32849        __struct.wind_y = buf.get_f32_le();
32850        __struct.wind_z = buf.get_f32_le();
32851        __struct.var_horiz = buf.get_f32_le();
32852        __struct.var_vert = buf.get_f32_le();
32853        __struct.wind_alt = buf.get_f32_le();
32854        __struct.horiz_accuracy = buf.get_f32_le();
32855        __struct.vert_accuracy = buf.get_f32_le();
32856        Ok(__struct)
32857    }
32858    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32859        let mut __tmp = BytesMut::new(bytes);
32860        #[allow(clippy::absurd_extreme_comparisons)]
32861        #[allow(unused_comparisons)]
32862        if __tmp.remaining() < Self::ENCODED_LEN {
32863            panic!(
32864                "buffer is too small (need {} bytes, but got {})",
32865                Self::ENCODED_LEN,
32866                __tmp.remaining(),
32867            )
32868        }
32869        __tmp.put_u64_le(self.time_usec);
32870        __tmp.put_f32_le(self.wind_x);
32871        __tmp.put_f32_le(self.wind_y);
32872        __tmp.put_f32_le(self.wind_z);
32873        __tmp.put_f32_le(self.var_horiz);
32874        __tmp.put_f32_le(self.var_vert);
32875        __tmp.put_f32_le(self.wind_alt);
32876        __tmp.put_f32_le(self.horiz_accuracy);
32877        __tmp.put_f32_le(self.vert_accuracy);
32878        if matches!(version, MavlinkVersion::V2) {
32879            let len = __tmp.len();
32880            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32881        } else {
32882            __tmp.len()
32883        }
32884    }
32885}
32886#[derive(Clone, PartialEq, Debug)]
32887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32888#[cfg_attr(feature = "serde", serde(tag = "type"))]
32889#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32890#[cfg_attr(feature = "ts", derive(TS))]
32891#[cfg_attr(feature = "ts", ts(export))]
32892#[repr(u32)]
32893pub enum MavMessage {
32894    #[doc = "Set the vehicle attitude and body angular rates."]
32895    #[doc = ""]
32896    #[doc = "ID: 140"]
32897    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32898    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
32899    #[doc = ""]
32900    #[doc = "ID: 375"]
32901    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32902    #[doc = "The location and information of an ADSB vehicle."]
32903    #[doc = ""]
32904    #[doc = "ID: 246"]
32905    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32906    #[doc = "The location and information of an AIS vessel."]
32907    #[doc = ""]
32908    #[doc = "ID: 301"]
32909    AIS_VESSEL(AIS_VESSEL_DATA),
32910    #[doc = "The current system altitude."]
32911    #[doc = ""]
32912    #[doc = "ID: 141"]
32913    ALTITUDE(ALTITUDE_DATA),
32914    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
32915    #[doc = ""]
32916    #[doc = "ID: 30"]
32917    ATTITUDE(ATTITUDE_DATA),
32918    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32919    #[doc = ""]
32920    #[doc = "ID: 31"]
32921    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32922    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32923    #[doc = ""]
32924    #[doc = "ID: 61"]
32925    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32926    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
32927    #[doc = ""]
32928    #[doc = "ID: 83"]
32929    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32930    #[doc = "Motion capture attitude and position."]
32931    #[doc = ""]
32932    #[doc = "ID: 138"]
32933    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32934    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
32935    #[doc = ""]
32936    #[doc = "ID: 7"]
32937    AUTH_KEY(AUTH_KEY_DATA),
32938    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
32939    #[doc = ""]
32940    #[doc = "ID: 286"]
32941    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32942    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
32943    #[doc = ""]
32944    #[doc = "ID: 148"]
32945    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32946    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
32947    #[doc = ""]
32948    #[doc = "ID: 435"]
32949    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32950    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
32951    #[doc = ""]
32952    #[doc = "ID: 437"]
32953    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32954    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32955    #[doc = ""]
32956    #[doc = "ID: 372"]
32957    BATTERY_INFO(BATTERY_INFO_DATA),
32958    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
32959    #[doc = ""]
32960    #[doc = "ID: 147"]
32961    BATTERY_STATUS(BATTERY_STATUS_DATA),
32962    #[doc = "Report button state change."]
32963    #[doc = ""]
32964    #[doc = "ID: 257"]
32965    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32966    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32967    #[doc = ""]
32968    #[doc = "ID: 262"]
32969    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32970    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32971    #[doc = ""]
32972    #[doc = "ID: 271"]
32973    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32974    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
32975    #[doc = ""]
32976    #[doc = "ID: 263"]
32977    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32978    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32979    #[doc = ""]
32980    #[doc = "ID: 259"]
32981    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32982    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32983    #[doc = ""]
32984    #[doc = "ID: 260"]
32985    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32986    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
32987    #[doc = ""]
32988    #[doc = "ID: 277"]
32989    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32990    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32991    #[doc = ""]
32992    #[doc = "ID: 276"]
32993    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32994    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32995    #[doc = ""]
32996    #[doc = "ID: 275"]
32997    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32998    #[doc = "Camera-IMU triggering and synchronisation message."]
32999    #[doc = ""]
33000    #[doc = "ID: 112"]
33001    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
33002    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
33003    #[doc = ""]
33004    #[doc = "ID: 387"]
33005    CANFD_FRAME(CANFD_FRAME_DATA),
33006    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
33007    #[doc = ""]
33008    #[doc = "ID: 388"]
33009    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
33010    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
33011    #[doc = ""]
33012    #[doc = "ID: 386"]
33013    CAN_FRAME(CAN_FRAME_DATA),
33014    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33015    #[doc = ""]
33016    #[doc = "ID: 336"]
33017    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
33018    #[doc = "Report current used cellular network status."]
33019    #[doc = ""]
33020    #[doc = "ID: 334"]
33021    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
33022    #[doc = "Request to control this MAV."]
33023    #[doc = ""]
33024    #[doc = "ID: 5"]
33025    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
33026    #[doc = "Accept / deny control of this MAV."]
33027    #[doc = ""]
33028    #[doc = "ID: 6"]
33029    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
33030    #[doc = "Information about a potential collision."]
33031    #[doc = ""]
33032    #[doc = "ID: 247"]
33033    COLLISION(COLLISION_DATA),
33034    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33035    #[doc = ""]
33036    #[doc = "ID: 77"]
33037    COMMAND_ACK(COMMAND_ACK_DATA),
33038    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33039    #[doc = ""]
33040    #[doc = "ID: 80"]
33041    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
33042    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33043    #[doc = ""]
33044    #[doc = "ID: 75"]
33045    COMMAND_INT(COMMAND_INT_DATA),
33046    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33047    #[doc = ""]
33048    #[doc = "ID: 76"]
33049    COMMAND_LONG(COMMAND_LONG_DATA),
33050    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
33051    #[doc = ""]
33052    #[doc = "ID: 395"]
33053    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
33054    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
33055    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
33056    #[doc = ""]
33057    #[doc = "ID: 396"]
33058    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
33059    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
33060    #[doc = ""]
33061    #[doc = "ID: 397"]
33062    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
33063    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
33064    #[doc = ""]
33065    #[doc = "ID: 146"]
33066    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
33067    #[doc = "offset response to encapsulated data."]
33068    #[doc = ""]
33069    #[doc = "ID: 50005"]
33070    CUBEPILOT_FIRMWARE_UPDATE_RESP(CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA),
33071    #[doc = "Start firmware update with encapsulated data."]
33072    #[doc = ""]
33073    #[doc = "ID: 50004"]
33074    CUBEPILOT_FIRMWARE_UPDATE_START(CUBEPILOT_FIRMWARE_UPDATE_START_DATA),
33075    #[doc = "Raw RC Data."]
33076    #[doc = ""]
33077    #[doc = "ID: 50001"]
33078    CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA),
33079    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
33080    #[doc = ""]
33081    #[doc = "ID: 411"]
33082    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
33083    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
33084    #[doc = ""]
33085    #[doc = "ID: 436"]
33086    CURRENT_MODE(CURRENT_MODE_DATA),
33087    #[doc = "Data stream status information."]
33088    #[doc = ""]
33089    #[doc = "ID: 67"]
33090    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
33091    DATA_STREAM(DATA_STREAM_DATA),
33092    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33093    #[doc = ""]
33094    #[doc = "ID: 130"]
33095    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
33096    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
33097    #[doc = ""]
33098    #[doc = "ID: 254"]
33099    DEBUG(DEBUG_DATA),
33100    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
33101    #[doc = ""]
33102    #[doc = "ID: 350"]
33103    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
33104    #[doc = "To debug something using a named 3D vector."]
33105    #[doc = ""]
33106    #[doc = "ID: 250"]
33107    DEBUG_VECT(DEBUG_VECT_DATA),
33108    #[doc = "Distance sensor information for an onboard rangefinder."]
33109    #[doc = ""]
33110    #[doc = "ID: 132"]
33111    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
33112    #[doc = "EFI status output."]
33113    #[doc = ""]
33114    #[doc = "ID: 225"]
33115    EFI_STATUS(EFI_STATUS_DATA),
33116    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33117    #[doc = ""]
33118    #[doc = "ID: 131"]
33119    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
33120    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
33121    #[doc = ""]
33122    #[doc = "ID: 290"]
33123    ESC_INFO(ESC_INFO_DATA),
33124    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
33125    #[doc = ""]
33126    #[doc = "ID: 291"]
33127    ESC_STATUS(ESC_STATUS_DATA),
33128    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
33129    #[doc = ""]
33130    #[doc = "ID: 230"]
33131    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
33132    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
33133    #[doc = ""]
33134    #[doc = "ID: 410"]
33135    EVENT(EVENT_DATA),
33136    #[doc = "Provides state for additional features."]
33137    #[doc = ""]
33138    #[doc = "ID: 245"]
33139    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
33140    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
33141    #[doc = ""]
33142    #[doc = "ID: 162"]
33143    FENCE_STATUS(FENCE_STATUS_DATA),
33144    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
33145    #[doc = ""]
33146    #[doc = "ID: 110"]
33147    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
33148    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
33149    #[doc = ""]
33150    #[doc = "ID: 264"]
33151    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
33152    #[doc = "Current motion information from a designated system."]
33153    #[doc = ""]
33154    #[doc = "ID: 144"]
33155    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
33156    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
33157    #[doc = ""]
33158    #[doc = "ID: 371"]
33159    FUEL_STATUS(FUEL_STATUS_DATA),
33160    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
33161    #[doc = ""]
33162    #[doc = "ID: 373"]
33163    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
33164    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
33165    #[doc = ""]
33166    #[doc = "ID: 285"]
33167    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
33168    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
33169    #[doc = ""]
33170    #[doc = "ID: 283"]
33171    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
33172    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
33173    #[doc = ""]
33174    #[doc = "ID: 284"]
33175    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
33176    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
33177    #[doc = ""]
33178    #[doc = "ID: 280"]
33179    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
33180    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33181    #[doc = ""]
33182    #[doc = "ID: 282"]
33183    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
33184    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33185    #[doc = ""]
33186    #[doc = "ID: 288"]
33187    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
33188    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
33189    #[doc = ""]
33190    #[doc = "ID: 287"]
33191    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
33192    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
33193    #[doc = ""]
33194    #[doc = "ID: 281"]
33195    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
33196    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
33197    #[doc = ""]
33198    #[doc = "ID: 33"]
33199    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
33200    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
33201    #[doc = ""]
33202    #[doc = "ID: 63"]
33203    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
33204    #[doc = "Global position/attitude estimate from a vision source."]
33205    #[doc = ""]
33206    #[doc = "ID: 101"]
33207    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
33208    #[doc = "Second GPS data."]
33209    #[doc = ""]
33210    #[doc = "ID: 124"]
33211    GPS2_RAW(GPS2_RAW_DATA),
33212    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
33213    #[doc = ""]
33214    #[doc = "ID: 128"]
33215    GPS2_RTK(GPS2_RTK_DATA),
33216    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
33217    #[doc = ""]
33218    #[doc = "ID: 49"]
33219    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
33220    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
33221    #[doc = ""]
33222    #[doc = "ID: 123"]
33223    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
33224    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
33225    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
33226    #[doc = ""]
33227    #[doc = "ID: 232"]
33228    GPS_INPUT(GPS_INPUT_DATA),
33229    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
33230    #[doc = ""]
33231    #[doc = "ID: 24"]
33232    GPS_RAW_INT(GPS_RAW_INT_DATA),
33233    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
33234    #[doc = ""]
33235    #[doc = "ID: 233"]
33236    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
33237    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
33238    #[doc = ""]
33239    #[doc = "ID: 127"]
33240    GPS_RTK(GPS_RTK_DATA),
33241    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
33242    #[doc = ""]
33243    #[doc = "ID: 25"]
33244    GPS_STATUS(GPS_STATUS_DATA),
33245    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
33246    #[doc = ""]
33247    #[doc = "ID: 0"]
33248    HEARTBEAT(HEARTBEAT_DATA),
33249    #[doc = "Herelink Telemetry."]
33250    #[doc = ""]
33251    #[doc = "ID: 50003"]
33252    HERELINK_TELEM(HERELINK_TELEM_DATA),
33253    #[doc = "Information about video stream."]
33254    #[doc = ""]
33255    #[doc = "ID: 50002"]
33256    HERELINK_VIDEO_STREAM_INFORMATION(HERELINK_VIDEO_STREAM_INFORMATION_DATA),
33257    #[doc = "The IMU readings in SI units in NED body frame."]
33258    #[doc = ""]
33259    #[doc = "ID: 105"]
33260    HIGHRES_IMU(HIGHRES_IMU_DATA),
33261    #[doc = "Message appropriate for high latency connections like Iridium."]
33262    #[doc = ""]
33263    #[doc = "ID: 234"]
33264    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
33265    HIGH_LATENCY(HIGH_LATENCY_DATA),
33266    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
33267    #[doc = ""]
33268    #[doc = "ID: 235"]
33269    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
33270    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
33271    #[doc = ""]
33272    #[doc = "ID: 93"]
33273    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
33274    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
33275    #[doc = ""]
33276    #[doc = "ID: 91"]
33277    HIL_CONTROLS(HIL_CONTROLS_DATA),
33278    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
33279    #[doc = ""]
33280    #[doc = "ID: 113"]
33281    HIL_GPS(HIL_GPS_DATA),
33282    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
33283    #[doc = ""]
33284    #[doc = "ID: 114"]
33285    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
33286    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
33287    #[doc = ""]
33288    #[doc = "ID: 92"]
33289    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
33290    #[doc = "The IMU readings in SI units in NED body frame."]
33291    #[doc = ""]
33292    #[doc = "ID: 107"]
33293    HIL_SENSOR(HIL_SENSOR_DATA),
33294    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
33295    #[doc = ""]
33296    #[doc = "ID: 90"]
33297    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
33298    HIL_STATE(HIL_STATE_DATA),
33299    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
33300    #[doc = ""]
33301    #[doc = "ID: 115"]
33302    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
33303    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
33304    #[doc = ""]
33305    #[doc = "ID: 242"]
33306    HOME_POSITION(HOME_POSITION_DATA),
33307    #[doc = "Temperature and humidity from hygrometer."]
33308    #[doc = ""]
33309    #[doc = "ID: 12920"]
33310    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
33311    #[doc = "Illuminator status."]
33312    #[doc = ""]
33313    #[doc = "ID: 440"]
33314    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
33315    #[doc = "Status of the Iridium SBD link."]
33316    #[doc = ""]
33317    #[doc = "ID: 335"]
33318    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
33319    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
33320    #[doc = ""]
33321    #[doc = "ID: 149"]
33322    LANDING_TARGET(LANDING_TARGET_DATA),
33323    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
33324    #[doc = ""]
33325    #[doc = "ID: 8"]
33326    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
33327    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33328    #[doc = ""]
33329    #[doc = "ID: 32"]
33330    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
33331    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33332    #[doc = ""]
33333    #[doc = "ID: 64"]
33334    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
33335    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33336    #[doc = ""]
33337    #[doc = "ID: 89"]
33338    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
33339    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
33340    #[doc = ""]
33341    #[doc = "ID: 268"]
33342    LOGGING_ACK(LOGGING_ACK_DATA),
33343    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
33344    #[doc = ""]
33345    #[doc = "ID: 266"]
33346    LOGGING_DATA(LOGGING_DATA_DATA),
33347    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
33348    #[doc = ""]
33349    #[doc = "ID: 267"]
33350    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
33351    #[doc = "Reply to LOG_REQUEST_DATA."]
33352    #[doc = ""]
33353    #[doc = "ID: 120"]
33354    LOG_DATA(LOG_DATA_DATA),
33355    #[doc = "Reply to LOG_REQUEST_LIST."]
33356    #[doc = ""]
33357    #[doc = "ID: 118"]
33358    LOG_ENTRY(LOG_ENTRY_DATA),
33359    #[doc = "Erase all logs."]
33360    #[doc = ""]
33361    #[doc = "ID: 121"]
33362    LOG_ERASE(LOG_ERASE_DATA),
33363    #[doc = "Request a chunk of a log."]
33364    #[doc = ""]
33365    #[doc = "ID: 119"]
33366    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
33367    #[doc = "Stop log transfer and resume normal logging."]
33368    #[doc = ""]
33369    #[doc = "ID: 122"]
33370    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
33371    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
33372    #[doc = ""]
33373    #[doc = "ID: 117"]
33374    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
33375    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
33376    #[doc = ""]
33377    #[doc = "ID: 192"]
33378    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
33379    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
33380    #[doc = ""]
33381    #[doc = "ID: 69"]
33382    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
33383    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
33384    #[doc = ""]
33385    #[doc = "ID: 81"]
33386    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
33387    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33388    #[doc = ""]
33389    #[doc = "ID: 249"]
33390    MEMORY_VECT(MEMORY_VECT_DATA),
33391    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
33392    #[doc = ""]
33393    #[doc = "ID: 244"]
33394    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
33395    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
33396    #[doc = ""]
33397    #[doc = "ID: 47"]
33398    MISSION_ACK(MISSION_ACK_DATA),
33399    #[doc = "Delete all mission items at once."]
33400    #[doc = ""]
33401    #[doc = "ID: 45"]
33402    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
33403    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
33404    #[doc = ""]
33405    #[doc = "ID: 44"]
33406    MISSION_COUNT(MISSION_COUNT_DATA),
33407    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
33408    #[doc = ""]
33409    #[doc = "ID: 42"]
33410    MISSION_CURRENT(MISSION_CURRENT_DATA),
33411    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33412    #[doc = ""]
33413    #[doc = "ID: 39"]
33414    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
33415    MISSION_ITEM(MISSION_ITEM_DATA),
33416    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33417    #[doc = ""]
33418    #[doc = "ID: 73"]
33419    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
33420    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
33421    #[doc = ""]
33422    #[doc = "ID: 46"]
33423    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
33424    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
33425    #[doc = ""]
33426    #[doc = "ID: 40"]
33427    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
33428    MISSION_REQUEST(MISSION_REQUEST_DATA),
33429    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
33430    #[doc = ""]
33431    #[doc = "ID: 51"]
33432    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33433    #[doc = "Request the overall list of mission items from the system/component."]
33434    #[doc = ""]
33435    #[doc = "ID: 43"]
33436    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33437    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33438    #[doc = ""]
33439    #[doc = "ID: 37"]
33440    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33441    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33442    #[doc = ""]
33443    #[doc = "ID: 41"]
33444    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33445    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33446    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33447    #[doc = ""]
33448    #[doc = "ID: 38"]
33449    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33450    #[doc = "Orientation of a mount."]
33451    #[doc = ""]
33452    #[doc = "ID: 265"]
33453    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33454    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33455    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33456    #[doc = ""]
33457    #[doc = "ID: 251"]
33458    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33459    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33460    #[doc = ""]
33461    #[doc = "ID: 252"]
33462    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33463    #[doc = "The state of the navigation and position controller."]
33464    #[doc = ""]
33465    #[doc = "ID: 62"]
33466    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33467    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33468    #[doc = ""]
33469    #[doc = "ID: 330"]
33470    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33471    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33472    #[doc = ""]
33473    #[doc = "ID: 331"]
33474    ODOMETRY(ODOMETRY_DATA),
33475    #[doc = "Hardware status sent by an onboard computer."]
33476    #[doc = ""]
33477    #[doc = "ID: 390"]
33478    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33479    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33480    #[doc = ""]
33481    #[doc = "ID: 12918"]
33482    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33483    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33484    #[doc = ""]
33485    #[doc = "ID: 12902"]
33486    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33487    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33488    #[doc = ""]
33489    #[doc = "ID: 12900"]
33490    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33491    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33492    #[doc = ""]
33493    #[doc = "ID: 12901"]
33494    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33495    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33496    #[doc = ""]
33497    #[doc = "ID: 12915"]
33498    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33499    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33500    #[doc = ""]
33501    #[doc = "ID: 12905"]
33502    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33503    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33504    #[doc = ""]
33505    #[doc = "ID: 12903"]
33506    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33507    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33508    #[doc = ""]
33509    #[doc = "ID: 12904"]
33510    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33511    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33512    #[doc = ""]
33513    #[doc = "ID: 12919"]
33514    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33515    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33516    #[doc = ""]
33517    #[doc = "ID: 100"]
33518    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33519    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33520    #[doc = ""]
33521    #[doc = "ID: 106"]
33522    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33523    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33524    #[doc = ""]
33525    #[doc = "ID: 360"]
33526    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33527    #[doc = "Response from a PARAM_EXT_SET message."]
33528    #[doc = ""]
33529    #[doc = "ID: 324"]
33530    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33531    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33532    #[doc = ""]
33533    #[doc = "ID: 321"]
33534    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33535    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33536    #[doc = ""]
33537    #[doc = "ID: 320"]
33538    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33539    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33540    #[doc = ""]
33541    #[doc = "ID: 323"]
33542    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33543    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33544    #[doc = ""]
33545    #[doc = "ID: 322"]
33546    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33547    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33548    #[doc = ""]
33549    #[doc = "ID: 50"]
33550    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33551    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33552    #[doc = ""]
33553    #[doc = "ID: 21"]
33554    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33555    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33556    #[doc = ""]
33557    #[doc = "ID: 20"]
33558    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33559    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33560    #[doc = ""]
33561    #[doc = "ID: 23"]
33562    PARAM_SET(PARAM_SET_DATA),
33563    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33564    #[doc = ""]
33565    #[doc = "ID: 22"]
33566    PARAM_VALUE(PARAM_VALUE_DATA),
33567    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33568    #[doc = ""]
33569    #[doc = "ID: 4"]
33570    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33571    PING(PING_DATA),
33572    #[doc = "Control vehicle tone generation (buzzer)."]
33573    #[doc = ""]
33574    #[doc = "ID: 258"]
33575    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33576    PLAY_TUNE(PLAY_TUNE_DATA),
33577    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33578    #[doc = ""]
33579    #[doc = "ID: 400"]
33580    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33581    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33582    #[doc = ""]
33583    #[doc = "ID: 87"]
33584    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33585    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33586    #[doc = ""]
33587    #[doc = "ID: 85"]
33588    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33589    #[doc = "Power supply status."]
33590    #[doc = ""]
33591    #[doc = "ID: 125"]
33592    POWER_STATUS(POWER_STATUS_DATA),
33593    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33594    #[doc = ""]
33595    #[doc = "ID: 300"]
33596    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33597    #[doc = "Status generated by radio and injected into MAVLink stream."]
33598    #[doc = ""]
33599    #[doc = "ID: 109"]
33600    RADIO_STATUS(RADIO_STATUS_DATA),
33601    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33602    #[doc = ""]
33603    #[doc = "ID: 27"]
33604    RAW_IMU(RAW_IMU_DATA),
33605    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33606    #[doc = ""]
33607    #[doc = "ID: 28"]
33608    RAW_PRESSURE(RAW_PRESSURE_DATA),
33609    #[doc = "RPM sensor data message."]
33610    #[doc = ""]
33611    #[doc = "ID: 339"]
33612    RAW_RPM(RAW_RPM_DATA),
33613    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33614    #[doc = ""]
33615    #[doc = "ID: 65"]
33616    RC_CHANNELS(RC_CHANNELS_DATA),
33617    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33618    #[doc = ""]
33619    #[doc = "ID: 70"]
33620    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33621    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33622    #[doc = ""]
33623    #[doc = "ID: 35"]
33624    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33625    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33626    #[doc = ""]
33627    #[doc = "ID: 34"]
33628    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33629    #[doc = "Request a data stream."]
33630    #[doc = ""]
33631    #[doc = "ID: 66"]
33632    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33633    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33634    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33635    #[doc = ""]
33636    #[doc = "ID: 412"]
33637    REQUEST_EVENT(REQUEST_EVENT_DATA),
33638    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33639    #[doc = ""]
33640    #[doc = "ID: 142"]
33641    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33642    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33643    #[doc = ""]
33644    #[doc = "ID: 413"]
33645    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33646    #[doc = "Read out the safety zone the MAV currently assumes."]
33647    #[doc = ""]
33648    #[doc = "ID: 55"]
33649    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33650    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33651    #[doc = ""]
33652    #[doc = "ID: 54"]
33653    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33654    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33655    #[doc = ""]
33656    #[doc = "ID: 26"]
33657    SCALED_IMU(SCALED_IMU_DATA),
33658    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33659    #[doc = ""]
33660    #[doc = "ID: 116"]
33661    SCALED_IMU2(SCALED_IMU2_DATA),
33662    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33663    #[doc = ""]
33664    #[doc = "ID: 129"]
33665    SCALED_IMU3(SCALED_IMU3_DATA),
33666    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33667    #[doc = ""]
33668    #[doc = "ID: 29"]
33669    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33670    #[doc = "Barometer readings for 2nd barometer."]
33671    #[doc = ""]
33672    #[doc = "ID: 137"]
33673    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33674    #[doc = "Barometer readings for 3rd barometer."]
33675    #[doc = ""]
33676    #[doc = "ID: 143"]
33677    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33678    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33679    #[doc = ""]
33680    #[doc = "ID: 126"]
33681    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33682    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33683    #[doc = ""]
33684    #[doc = "ID: 36"]
33685    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33686    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33687    #[doc = ""]
33688    #[doc = "ID: 256"]
33689    SETUP_SIGNING(SETUP_SIGNING_DATA),
33690    #[doc = "Set the vehicle attitude and body angular rates."]
33691    #[doc = ""]
33692    #[doc = "ID: 139"]
33693    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33694    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33695    #[doc = ""]
33696    #[doc = "ID: 82"]
33697    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33698    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33699    #[doc = ""]
33700    #[doc = "ID: 48"]
33701    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33702    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33703    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33704    #[doc = ""]
33705    #[doc = "ID: 243"]
33706    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33707    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33708    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33709    #[doc = ""]
33710    #[doc = "ID: 11"]
33711    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33712    SET_MODE(SET_MODE_DATA),
33713    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33714    #[doc = ""]
33715    #[doc = "ID: 86"]
33716    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33717    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33718    #[doc = ""]
33719    #[doc = "ID: 84"]
33720    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33721    #[doc = "Status of simulation environment, if used."]
33722    #[doc = ""]
33723    #[doc = "ID: 108"]
33724    SIM_STATE(SIM_STATE_DATA),
33725    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33726    #[doc = ""]
33727    #[doc = "ID: 370"]
33728    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33729    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33730    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
33731    #[doc = ""]
33732    #[doc = "ID: 253"]
33733    STATUSTEXT(STATUSTEXT_DATA),
33734    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
33735    #[doc = ""]
33736    #[doc = "ID: 261"]
33737    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
33738    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
33739    #[doc = ""]
33740    #[doc = "ID: 401"]
33741    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
33742    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
33743    #[doc = ""]
33744    #[doc = "ID: 2"]
33745    SYSTEM_TIME(SYSTEM_TIME_DATA),
33746    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
33747    #[doc = ""]
33748    #[doc = "ID: 1"]
33749    SYS_STATUS(SYS_STATUS_DATA),
33750    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
33751    #[doc = ""]
33752    #[doc = "ID: 135"]
33753    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
33754    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33755    #[doc = ""]
33756    #[doc = "ID: 134"]
33757    TERRAIN_DATA(TERRAIN_DATA_DATA),
33758    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33759    #[doc = ""]
33760    #[doc = "ID: 136"]
33761    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
33762    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33763    #[doc = ""]
33764    #[doc = "ID: 133"]
33765    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
33766    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
33767    #[doc = ""]
33768    #[doc = "ID: 111"]
33769    TIMESYNC(TIMESYNC_DATA),
33770    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
33771    #[doc = ""]
33772    #[doc = "ID: 380"]
33773    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
33774    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
33775    #[doc = ""]
33776    #[doc = "ID: 333"]
33777    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
33778    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
33779    #[doc = ""]
33780    #[doc = "ID: 332"]
33781    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
33782    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
33783    #[doc = ""]
33784    #[doc = "ID: 385"]
33785    TUNNEL(TUNNEL_DATA),
33786    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33787    #[doc = ""]
33788    #[doc = "ID: 311"]
33789    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
33790    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33791    #[doc = ""]
33792    #[doc = "ID: 310"]
33793    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
33794    #[doc = "The global position resulting from GPS and sensor fusion."]
33795    #[doc = ""]
33796    #[doc = "ID: 340"]
33797    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
33798    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33799    #[doc = ""]
33800    #[doc = "ID: 248"]
33801    V2_EXTENSION(V2_EXTENSION_DATA),
33802    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33803    #[doc = ""]
33804    #[doc = "ID: 74"]
33805    VFR_HUD(VFR_HUD_DATA),
33806    #[doc = "Vibration levels and accelerometer clipping."]
33807    #[doc = ""]
33808    #[doc = "ID: 241"]
33809    VIBRATION(VIBRATION_DATA),
33810    #[doc = "Global position estimate from a Vicon motion system source."]
33811    #[doc = ""]
33812    #[doc = "ID: 104"]
33813    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
33814    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33815    #[doc = ""]
33816    #[doc = "ID: 269"]
33817    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
33818    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33819    #[doc = ""]
33820    #[doc = "ID: 270"]
33821    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
33822    #[doc = "Local position/attitude estimate from a vision source."]
33823    #[doc = ""]
33824    #[doc = "ID: 102"]
33825    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33826    #[doc = "Speed estimate from a vision source."]
33827    #[doc = ""]
33828    #[doc = "ID: 103"]
33829    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33830    #[doc = "Cumulative distance traveled for each reported wheel."]
33831    #[doc = ""]
33832    #[doc = "ID: 9000"]
33833    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33834    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33835    #[doc = ""]
33836    #[doc = "ID: 299"]
33837    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33838    #[doc = "Winch status."]
33839    #[doc = ""]
33840    #[doc = "ID: 9005"]
33841    WINCH_STATUS(WINCH_STATUS_DATA),
33842    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33843    #[doc = ""]
33844    #[doc = "ID: 231"]
33845    WIND_COV(WIND_COV_DATA),
33846}
33847impl MavMessage {
33848    pub const fn all_ids() -> &'static [u32] {
33849        &[
33850            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33851            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33852            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33853            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33854            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33855            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33856            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33857            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33858            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33859            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33860            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
33861            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
33862            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
33863            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
33864            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
33865            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
33866            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
33867            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
33868            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
33869            440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
33870            12915u32, 12918u32, 12919u32, 12920u32, 50001u32, 50002u32, 50003u32, 50004u32,
33871            50005u32,
33872        ]
33873    }
33874}
33875impl Message for MavMessage {
33876    fn parse(
33877        version: MavlinkVersion,
33878        id: u32,
33879        payload: &[u8],
33880    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33881        match id {
33882            ACTUATOR_CONTROL_TARGET_DATA::ID => {
33883                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33884                    .map(Self::ACTUATOR_CONTROL_TARGET)
33885            }
33886            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
33887                .map(Self::ACTUATOR_OUTPUT_STATUS),
33888            ADSB_VEHICLE_DATA::ID => {
33889                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
33890            }
33891            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
33892            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
33893            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
33894            ATTITUDE_QUATERNION_DATA::ID => {
33895                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
33896            }
33897            ATTITUDE_QUATERNION_COV_DATA::ID => {
33898                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
33899                    .map(Self::ATTITUDE_QUATERNION_COV)
33900            }
33901            ATTITUDE_TARGET_DATA::ID => {
33902                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
33903            }
33904            ATT_POS_MOCAP_DATA::ID => {
33905                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
33906            }
33907            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
33908            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33909                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
33910                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
33911            }
33912            AUTOPILOT_VERSION_DATA::ID => {
33913                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
33914            }
33915            AVAILABLE_MODES_DATA::ID => {
33916                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
33917            }
33918            AVAILABLE_MODES_MONITOR_DATA::ID => {
33919                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
33920                    .map(Self::AVAILABLE_MODES_MONITOR)
33921            }
33922            BATTERY_INFO_DATA::ID => {
33923                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
33924            }
33925            BATTERY_STATUS_DATA::ID => {
33926                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
33927            }
33928            BUTTON_CHANGE_DATA::ID => {
33929                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
33930            }
33931            CAMERA_CAPTURE_STATUS_DATA::ID => {
33932                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
33933            }
33934            CAMERA_FOV_STATUS_DATA::ID => {
33935                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
33936            }
33937            CAMERA_IMAGE_CAPTURED_DATA::ID => {
33938                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
33939            }
33940            CAMERA_INFORMATION_DATA::ID => {
33941                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
33942            }
33943            CAMERA_SETTINGS_DATA::ID => {
33944                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
33945            }
33946            CAMERA_THERMAL_RANGE_DATA::ID => {
33947                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
33948            }
33949            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
33950                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
33951                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
33952            }
33953            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
33954                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
33955                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
33956            }
33957            CAMERA_TRIGGER_DATA::ID => {
33958                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
33959            }
33960            CANFD_FRAME_DATA::ID => {
33961                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
33962            }
33963            CAN_FILTER_MODIFY_DATA::ID => {
33964                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
33965            }
33966            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
33967            CELLULAR_CONFIG_DATA::ID => {
33968                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
33969            }
33970            CELLULAR_STATUS_DATA::ID => {
33971                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
33972            }
33973            CHANGE_OPERATOR_CONTROL_DATA::ID => {
33974                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
33975                    .map(Self::CHANGE_OPERATOR_CONTROL)
33976            }
33977            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
33978                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
33979                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
33980            }
33981            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
33982            COMMAND_ACK_DATA::ID => {
33983                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
33984            }
33985            COMMAND_CANCEL_DATA::ID => {
33986                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
33987            }
33988            COMMAND_INT_DATA::ID => {
33989                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
33990            }
33991            COMMAND_LONG_DATA::ID => {
33992                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
33993            }
33994            COMPONENT_INFORMATION_DATA::ID => {
33995                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
33996            }
33997            COMPONENT_INFORMATION_BASIC_DATA::ID => {
33998                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
33999                    .map(Self::COMPONENT_INFORMATION_BASIC)
34000            }
34001            COMPONENT_METADATA_DATA::ID => {
34002                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
34003            }
34004            CONTROL_SYSTEM_STATE_DATA::ID => {
34005                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
34006            }
34007            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => {
34008                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::deser(version, payload)
34009                    .map(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP)
34010            }
34011            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
34012                CUBEPILOT_FIRMWARE_UPDATE_START_DATA::deser(version, payload)
34013                    .map(Self::CUBEPILOT_FIRMWARE_UPDATE_START)
34014            }
34015            CUBEPILOT_RAW_RC_DATA::ID => {
34016                CUBEPILOT_RAW_RC_DATA::deser(version, payload).map(Self::CUBEPILOT_RAW_RC)
34017            }
34018            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
34019                .map(Self::CURRENT_EVENT_SEQUENCE),
34020            CURRENT_MODE_DATA::ID => {
34021                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
34022            }
34023            DATA_STREAM_DATA::ID => {
34024                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
34025            }
34026            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
34027                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
34028                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
34029            }
34030            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
34031            DEBUG_FLOAT_ARRAY_DATA::ID => {
34032                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
34033            }
34034            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
34035            DISTANCE_SENSOR_DATA::ID => {
34036                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
34037            }
34038            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
34039            ENCAPSULATED_DATA_DATA::ID => {
34040                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
34041            }
34042            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
34043            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
34044            ESTIMATOR_STATUS_DATA::ID => {
34045                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
34046            }
34047            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
34048            EXTENDED_SYS_STATE_DATA::ID => {
34049                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
34050            }
34051            FENCE_STATUS_DATA::ID => {
34052                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
34053            }
34054            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
34055                .map(Self::FILE_TRANSFER_PROTOCOL),
34056            FLIGHT_INFORMATION_DATA::ID => {
34057                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
34058            }
34059            FOLLOW_TARGET_DATA::ID => {
34060                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
34061            }
34062            FUEL_STATUS_DATA::ID => {
34063                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
34064            }
34065            GENERATOR_STATUS_DATA::ID => {
34066                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
34067            }
34068            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
34069                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
34070                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
34071            }
34072            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
34073                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
34074                    .map(Self::GIMBAL_DEVICE_INFORMATION)
34075            }
34076            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
34077                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
34078                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
34079            }
34080            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
34081                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
34082                    .map(Self::GIMBAL_MANAGER_INFORMATION)
34083            }
34084            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
34085                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
34086                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
34087            }
34088            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34089                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
34090                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
34091            }
34092            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
34093                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
34094                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
34095            }
34096            GIMBAL_MANAGER_STATUS_DATA::ID => {
34097                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
34098            }
34099            GLOBAL_POSITION_INT_DATA::ID => {
34100                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
34101            }
34102            GLOBAL_POSITION_INT_COV_DATA::ID => {
34103                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
34104                    .map(Self::GLOBAL_POSITION_INT_COV)
34105            }
34106            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34107                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34108                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
34109            }
34110            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
34111            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
34112            GPS_GLOBAL_ORIGIN_DATA::ID => {
34113                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
34114            }
34115            GPS_INJECT_DATA_DATA::ID => {
34116                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
34117            }
34118            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
34119            GPS_RAW_INT_DATA::ID => {
34120                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
34121            }
34122            GPS_RTCM_DATA_DATA::ID => {
34123                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
34124            }
34125            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
34126            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
34127            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
34128            HERELINK_TELEM_DATA::ID => {
34129                HERELINK_TELEM_DATA::deser(version, payload).map(Self::HERELINK_TELEM)
34130            }
34131            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
34132                HERELINK_VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34133                    .map(Self::HERELINK_VIDEO_STREAM_INFORMATION)
34134            }
34135            HIGHRES_IMU_DATA::ID => {
34136                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
34137            }
34138            HIGH_LATENCY_DATA::ID => {
34139                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
34140            }
34141            HIGH_LATENCY2_DATA::ID => {
34142                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
34143            }
34144            HIL_ACTUATOR_CONTROLS_DATA::ID => {
34145                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
34146            }
34147            HIL_CONTROLS_DATA::ID => {
34148                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
34149            }
34150            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
34151            HIL_OPTICAL_FLOW_DATA::ID => {
34152                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
34153            }
34154            HIL_RC_INPUTS_RAW_DATA::ID => {
34155                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
34156            }
34157            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
34158            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
34159            HIL_STATE_QUATERNION_DATA::ID => {
34160                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
34161            }
34162            HOME_POSITION_DATA::ID => {
34163                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
34164            }
34165            HYGROMETER_SENSOR_DATA::ID => {
34166                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
34167            }
34168            ILLUMINATOR_STATUS_DATA::ID => {
34169                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
34170            }
34171            ISBD_LINK_STATUS_DATA::ID => {
34172                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
34173            }
34174            LANDING_TARGET_DATA::ID => {
34175                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
34176            }
34177            LINK_NODE_STATUS_DATA::ID => {
34178                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
34179            }
34180            LOCAL_POSITION_NED_DATA::ID => {
34181                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
34182            }
34183            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
34184                .map(Self::LOCAL_POSITION_NED_COV),
34185            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34186                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
34187                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
34188            }
34189            LOGGING_ACK_DATA::ID => {
34190                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
34191            }
34192            LOGGING_DATA_DATA::ID => {
34193                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
34194            }
34195            LOGGING_DATA_ACKED_DATA::ID => {
34196                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
34197            }
34198            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
34199            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
34200            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
34201            LOG_REQUEST_DATA_DATA::ID => {
34202                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
34203            }
34204            LOG_REQUEST_END_DATA::ID => {
34205                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
34206            }
34207            LOG_REQUEST_LIST_DATA::ID => {
34208                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
34209            }
34210            MAG_CAL_REPORT_DATA::ID => {
34211                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
34212            }
34213            MANUAL_CONTROL_DATA::ID => {
34214                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
34215            }
34216            MANUAL_SETPOINT_DATA::ID => {
34217                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
34218            }
34219            MEMORY_VECT_DATA::ID => {
34220                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
34221            }
34222            MESSAGE_INTERVAL_DATA::ID => {
34223                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
34224            }
34225            MISSION_ACK_DATA::ID => {
34226                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
34227            }
34228            MISSION_CLEAR_ALL_DATA::ID => {
34229                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
34230            }
34231            MISSION_COUNT_DATA::ID => {
34232                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
34233            }
34234            MISSION_CURRENT_DATA::ID => {
34235                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
34236            }
34237            MISSION_ITEM_DATA::ID => {
34238                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
34239            }
34240            MISSION_ITEM_INT_DATA::ID => {
34241                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
34242            }
34243            MISSION_ITEM_REACHED_DATA::ID => {
34244                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
34245            }
34246            MISSION_REQUEST_DATA::ID => {
34247                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
34248            }
34249            MISSION_REQUEST_INT_DATA::ID => {
34250                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
34251            }
34252            MISSION_REQUEST_LIST_DATA::ID => {
34253                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
34254            }
34255            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
34256                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
34257                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
34258            }
34259            MISSION_SET_CURRENT_DATA::ID => {
34260                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
34261            }
34262            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
34263                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
34264                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
34265            }
34266            MOUNT_ORIENTATION_DATA::ID => {
34267                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
34268            }
34269            NAMED_VALUE_FLOAT_DATA::ID => {
34270                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
34271            }
34272            NAMED_VALUE_INT_DATA::ID => {
34273                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
34274            }
34275            NAV_CONTROLLER_OUTPUT_DATA::ID => {
34276                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
34277            }
34278            OBSTACLE_DISTANCE_DATA::ID => {
34279                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
34280            }
34281            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
34282            ONBOARD_COMPUTER_STATUS_DATA::ID => {
34283                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
34284                    .map(Self::ONBOARD_COMPUTER_STATUS)
34285            }
34286            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
34287                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
34288                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
34289            }
34290            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
34291                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
34292                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
34293            }
34294            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
34295                .map(Self::OPEN_DRONE_ID_BASIC_ID),
34296            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
34297                .map(Self::OPEN_DRONE_ID_LOCATION),
34298            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
34299                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
34300                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
34301            }
34302            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
34303                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
34304                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
34305            }
34306            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
34307                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
34308            }
34309            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
34310                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
34311            }
34312            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
34313                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
34314                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
34315            }
34316            OPTICAL_FLOW_DATA::ID => {
34317                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
34318            }
34319            OPTICAL_FLOW_RAD_DATA::ID => {
34320                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
34321            }
34322            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
34323                .map(Self::ORBIT_EXECUTION_STATUS),
34324            PARAM_EXT_ACK_DATA::ID => {
34325                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
34326            }
34327            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
34328                .map(Self::PARAM_EXT_REQUEST_LIST),
34329            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
34330                .map(Self::PARAM_EXT_REQUEST_READ),
34331            PARAM_EXT_SET_DATA::ID => {
34332                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
34333            }
34334            PARAM_EXT_VALUE_DATA::ID => {
34335                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
34336            }
34337            PARAM_MAP_RC_DATA::ID => {
34338                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
34339            }
34340            PARAM_REQUEST_LIST_DATA::ID => {
34341                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
34342            }
34343            PARAM_REQUEST_READ_DATA::ID => {
34344                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
34345            }
34346            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
34347            PARAM_VALUE_DATA::ID => {
34348                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
34349            }
34350            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
34351            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
34352            PLAY_TUNE_V2_DATA::ID => {
34353                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
34354            }
34355            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34356                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34357                    .map(Self::POSITION_TARGET_GLOBAL_INT)
34358            }
34359            POSITION_TARGET_LOCAL_NED_DATA::ID => {
34360                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34361                    .map(Self::POSITION_TARGET_LOCAL_NED)
34362            }
34363            POWER_STATUS_DATA::ID => {
34364                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
34365            }
34366            PROTOCOL_VERSION_DATA::ID => {
34367                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
34368            }
34369            RADIO_STATUS_DATA::ID => {
34370                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
34371            }
34372            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
34373            RAW_PRESSURE_DATA::ID => {
34374                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
34375            }
34376            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
34377            RC_CHANNELS_DATA::ID => {
34378                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
34379            }
34380            RC_CHANNELS_OVERRIDE_DATA::ID => {
34381                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
34382            }
34383            RC_CHANNELS_RAW_DATA::ID => {
34384                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
34385            }
34386            RC_CHANNELS_SCALED_DATA::ID => {
34387                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
34388            }
34389            REQUEST_DATA_STREAM_DATA::ID => {
34390                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
34391            }
34392            REQUEST_EVENT_DATA::ID => {
34393                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
34394            }
34395            RESOURCE_REQUEST_DATA::ID => {
34396                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
34397            }
34398            RESPONSE_EVENT_ERROR_DATA::ID => {
34399                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
34400            }
34401            SAFETY_ALLOWED_AREA_DATA::ID => {
34402                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
34403            }
34404            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
34405                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
34406                    .map(Self::SAFETY_SET_ALLOWED_AREA)
34407            }
34408            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
34409            SCALED_IMU2_DATA::ID => {
34410                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
34411            }
34412            SCALED_IMU3_DATA::ID => {
34413                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
34414            }
34415            SCALED_PRESSURE_DATA::ID => {
34416                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
34417            }
34418            SCALED_PRESSURE2_DATA::ID => {
34419                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34420            }
34421            SCALED_PRESSURE3_DATA::ID => {
34422                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34423            }
34424            SERIAL_CONTROL_DATA::ID => {
34425                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34426            }
34427            SERVO_OUTPUT_RAW_DATA::ID => {
34428                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34429            }
34430            SETUP_SIGNING_DATA::ID => {
34431                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34432            }
34433            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34434                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34435                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34436            }
34437            SET_ATTITUDE_TARGET_DATA::ID => {
34438                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34439            }
34440            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34441                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34442            }
34443            SET_HOME_POSITION_DATA::ID => {
34444                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34445            }
34446            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34447            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34448                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34449                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34450            }
34451            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34452                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34453                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34454            }
34455            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34456            SMART_BATTERY_INFO_DATA::ID => {
34457                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34458            }
34459            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34460            STORAGE_INFORMATION_DATA::ID => {
34461                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34462            }
34463            SUPPORTED_TUNES_DATA::ID => {
34464                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34465            }
34466            SYSTEM_TIME_DATA::ID => {
34467                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34468            }
34469            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34470            TERRAIN_CHECK_DATA::ID => {
34471                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34472            }
34473            TERRAIN_DATA_DATA::ID => {
34474                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34475            }
34476            TERRAIN_REPORT_DATA::ID => {
34477                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34478            }
34479            TERRAIN_REQUEST_DATA::ID => {
34480                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34481            }
34482            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34483            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34484                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34485                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34486            }
34487            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34488                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34489                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34490            }
34491            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34492                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34493                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34494            }
34495            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34496            UAVCAN_NODE_INFO_DATA::ID => {
34497                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34498            }
34499            UAVCAN_NODE_STATUS_DATA::ID => {
34500                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34501            }
34502            UTM_GLOBAL_POSITION_DATA::ID => {
34503                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34504            }
34505            V2_EXTENSION_DATA::ID => {
34506                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34507            }
34508            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34509            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34510            VICON_POSITION_ESTIMATE_DATA::ID => {
34511                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34512                    .map(Self::VICON_POSITION_ESTIMATE)
34513            }
34514            VIDEO_STREAM_INFORMATION_DATA::ID => {
34515                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34516                    .map(Self::VIDEO_STREAM_INFORMATION)
34517            }
34518            VIDEO_STREAM_STATUS_DATA::ID => {
34519                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34520            }
34521            VISION_POSITION_ESTIMATE_DATA::ID => {
34522                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34523                    .map(Self::VISION_POSITION_ESTIMATE)
34524            }
34525            VISION_SPEED_ESTIMATE_DATA::ID => {
34526                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34527            }
34528            WHEEL_DISTANCE_DATA::ID => {
34529                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34530            }
34531            WIFI_CONFIG_AP_DATA::ID => {
34532                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34533            }
34534            WINCH_STATUS_DATA::ID => {
34535                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34536            }
34537            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34538            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34539        }
34540    }
34541    fn message_name(&self) -> &'static str {
34542        match self {
34543            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34544            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34545            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34546            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34547            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34548            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34549            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34550            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34551            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34552            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34553            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34554            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34555                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34556            }
34557            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34558            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34559            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34560            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34561            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34562            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34563            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34564            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34565            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34566            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34567            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34568            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34569            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34570            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34571            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34572            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34573            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34574            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34575            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34576            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34577            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34578            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34579            Self::COLLISION(..) => COLLISION_DATA::NAME,
34580            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34581            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34582            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34583            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34584            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34585            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34586            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34587            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34588            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(..) => CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::NAME,
34589            Self::CUBEPILOT_FIRMWARE_UPDATE_START(..) => CUBEPILOT_FIRMWARE_UPDATE_START_DATA::NAME,
34590            Self::CUBEPILOT_RAW_RC(..) => CUBEPILOT_RAW_RC_DATA::NAME,
34591            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34592            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34593            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34594            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34595            Self::DEBUG(..) => DEBUG_DATA::NAME,
34596            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34597            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34598            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34599            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34600            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34601            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34602            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34603            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34604            Self::EVENT(..) => EVENT_DATA::NAME,
34605            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34606            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34607            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34608            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34609            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34610            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34611            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34612            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34613            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34614            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34615            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34616            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34617            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34618                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34619            }
34620            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34621            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34622            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34623            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34624            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34625            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34626            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34627            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34628            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34629            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34630            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34631            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34632            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34633            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34634            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34635            Self::HERELINK_TELEM(..) => HERELINK_TELEM_DATA::NAME,
34636            Self::HERELINK_VIDEO_STREAM_INFORMATION(..) => {
34637                HERELINK_VIDEO_STREAM_INFORMATION_DATA::NAME
34638            }
34639            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34640            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34641            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34642            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34643            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34644            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34645            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34646            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34647            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34648            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34649            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34650            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34651            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34652            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34653            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34654            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34655            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34656            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34657            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34658            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34659                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34660            }
34661            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34662            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34663            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34664            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34665            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34666            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34667            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34668            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34669            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34670            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34671            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34672            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34673            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34674            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34675            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34676            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34677            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34678            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34679            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34680            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34681            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34682            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34683            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34684            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34685            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34686            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34687            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34688            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34689            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34690            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34691            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34692            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34693            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34694            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34695            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34696            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34697            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34698            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34699            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34700            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34701            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34702            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34703            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34704            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34705            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34706            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34707            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34708            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34709            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34710            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34711            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34712            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34713            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
34714            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34715            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34716            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34717            Self::PING(..) => PING_DATA::NAME,
34718            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
34719            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34720            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34721            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34722            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34723            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34724            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34725            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34726            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34727            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34728            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34729            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34730            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34731            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34732            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34733            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
34734            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
34735            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34736            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34737            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34738            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34739            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34740            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34741            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34742            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34743            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34744            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34745            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34746            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34747            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34748            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34749            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34750            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34751            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34752            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34753            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34754            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34755            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34756            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34757            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34758            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34759            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34760            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34761            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34762            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34763            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34764            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34765            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34766            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34767            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34768                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34769            }
34770            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34771                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34772            }
34773            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
34774            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34775            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34776            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34777            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34778            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34779            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34780            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34781            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34782            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34783            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
34784            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
34785            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34786            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34787            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34788            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34789        }
34790    }
34791    fn message_id(&self) -> u32 {
34792        match self {
34793            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34794            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34795            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34796            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34797            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34798            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34799            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34800            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34801            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34802            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34803            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34804            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34805                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34806            }
34807            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34808            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34809            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34810            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34811            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34812            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34813            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34814            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34815            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34816            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34817            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34818            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34819            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34820            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34821            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34822            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34823            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34824            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34825            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34826            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34827            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34828            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34829            Self::COLLISION(..) => COLLISION_DATA::ID,
34830            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34831            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34832            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34833            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34834            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34835            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34836            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34837            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34838            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(..) => CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID,
34839            Self::CUBEPILOT_FIRMWARE_UPDATE_START(..) => CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID,
34840            Self::CUBEPILOT_RAW_RC(..) => CUBEPILOT_RAW_RC_DATA::ID,
34841            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34842            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34843            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34844            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34845            Self::DEBUG(..) => DEBUG_DATA::ID,
34846            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34847            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34848            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34849            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34850            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34851            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34852            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34853            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34854            Self::EVENT(..) => EVENT_DATA::ID,
34855            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34856            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34857            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34858            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34859            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34860            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34861            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34862            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34863            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34864            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34865            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34866            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34867            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34868                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34869            }
34870            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34871            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34872            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34873            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34874            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34875            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34876            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34877            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
34878            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
34879            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
34880            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
34881            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
34882            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
34883            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
34884            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
34885            Self::HERELINK_TELEM(..) => HERELINK_TELEM_DATA::ID,
34886            Self::HERELINK_VIDEO_STREAM_INFORMATION(..) => {
34887                HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID
34888            }
34889            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
34890            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
34891            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
34892            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
34893            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
34894            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
34895            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
34896            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
34897            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
34898            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
34899            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
34900            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
34901            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
34902            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
34903            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
34904            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
34905            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
34906            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
34907            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
34908            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34909                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
34910            }
34911            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
34912            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
34913            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
34914            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
34915            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
34916            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
34917            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
34918            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
34919            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
34920            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
34921            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
34922            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
34923            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
34924            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
34925            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
34926            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
34927            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
34928            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
34929            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
34930            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
34931            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
34932            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
34933            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
34934            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
34935            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
34936            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
34937            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
34938            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
34939            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
34940            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
34941            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
34942            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
34943            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
34944            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
34945            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
34946            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
34947            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
34948            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
34949            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
34950            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
34951            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
34952            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
34953            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
34954            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
34955            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
34956            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
34957            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
34958            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
34959            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
34960            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
34961            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
34962            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
34963            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
34964            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
34965            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
34966            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
34967            Self::PING(..) => PING_DATA::ID,
34968            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
34969            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
34970            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
34971            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
34972            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
34973            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
34974            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
34975            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
34976            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
34977            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
34978            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
34979            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
34980            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
34981            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
34982            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
34983            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
34984            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
34985            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
34986            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
34987            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
34988            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
34989            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
34990            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
34991            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
34992            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
34993            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
34994            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
34995            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
34996            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
34997            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
34998            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
34999            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
35000            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
35001            Self::SET_MODE(..) => SET_MODE_DATA::ID,
35002            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
35003            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
35004            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
35005            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
35006            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
35007            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
35008            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
35009            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
35010            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
35011            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
35012            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
35013            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
35014            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
35015            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
35016            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
35017            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
35018            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35019                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
35020            }
35021            Self::TUNNEL(..) => TUNNEL_DATA::ID,
35022            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
35023            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
35024            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
35025            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
35026            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
35027            Self::VIBRATION(..) => VIBRATION_DATA::ID,
35028            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
35029            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
35030            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
35031            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
35032            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
35033            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
35034            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
35035            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
35036            Self::WIND_COV(..) => WIND_COV_DATA::ID,
35037        }
35038    }
35039    fn message_id_from_name(name: &str) -> Option<u32> {
35040        match name {
35041            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
35042            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
35043            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
35044            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
35045            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
35046            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
35047            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
35048            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
35049            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
35050            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
35051            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
35052            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
35053                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
35054            }
35055            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
35056            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
35057            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
35058            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
35059            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
35060            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
35061            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
35062            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
35063            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
35064            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
35065            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
35066            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
35067            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
35068            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
35069            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
35070            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
35071            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
35072            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
35073            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
35074            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
35075            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
35076            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
35077            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
35078            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
35079            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
35080            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
35081            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
35082            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
35083            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
35084            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
35085            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
35086            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::NAME => {
35087                Some(CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID)
35088            }
35089            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::NAME => {
35090                Some(CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID)
35091            }
35092            CUBEPILOT_RAW_RC_DATA::NAME => Some(CUBEPILOT_RAW_RC_DATA::ID),
35093            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
35094            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
35095            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
35096            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
35097            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
35098            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
35099            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
35100            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
35101            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
35102            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
35103            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
35104            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
35105            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
35106            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
35107            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
35108            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
35109            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
35110            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
35111            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
35112            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
35113            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
35114            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
35115                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
35116            }
35117            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
35118            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
35119            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
35120            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
35121            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
35122                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
35123            }
35124            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
35125            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
35126            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
35127            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
35128            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
35129                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
35130            }
35131            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
35132            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
35133            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
35134            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
35135            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
35136            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
35137            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
35138            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
35139            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
35140            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
35141            HERELINK_TELEM_DATA::NAME => Some(HERELINK_TELEM_DATA::ID),
35142            HERELINK_VIDEO_STREAM_INFORMATION_DATA::NAME => {
35143                Some(HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID)
35144            }
35145            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
35146            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
35147            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
35148            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
35149            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
35150            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
35151            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
35152            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
35153            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
35154            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
35155            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
35156            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
35157            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
35158            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
35159            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
35160            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
35161            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
35162            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
35163            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
35164            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
35165                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
35166            }
35167            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
35168            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
35169            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
35170            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
35171            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
35172            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
35173            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
35174            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
35175            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
35176            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
35177            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
35178            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
35179            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
35180            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
35181            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
35182            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
35183            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
35184            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
35185            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
35186            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
35187            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
35188            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
35189            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
35190            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
35191            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
35192            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
35193            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
35194            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
35195            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
35196            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
35197            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
35198            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
35199            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
35200            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
35201            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
35202            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
35203            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
35204            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
35205            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
35206            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
35207            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
35208            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
35209            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
35210            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
35211            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
35212            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
35213            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
35214            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
35215            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
35216            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
35217            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
35218            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
35219            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
35220            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
35221            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
35222            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
35223            PING_DATA::NAME => Some(PING_DATA::ID),
35224            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
35225            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
35226            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
35227            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
35228            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
35229            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
35230            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
35231            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
35232            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
35233            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
35234            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
35235            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
35236            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
35237            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
35238            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
35239            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
35240            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
35241            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
35242            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
35243            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
35244            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
35245            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
35246            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
35247            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
35248            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
35249            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
35250            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
35251            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
35252            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
35253            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
35254            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
35255            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
35256            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
35257            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
35258            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
35259                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
35260            }
35261            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
35262                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
35263            }
35264            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
35265            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
35266            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
35267            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
35268            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
35269            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
35270            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
35271            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
35272            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
35273            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
35274            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
35275            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
35276            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
35277            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
35278                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
35279            }
35280            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
35281                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
35282            }
35283            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
35284            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
35285            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
35286            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
35287            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
35288            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
35289            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
35290            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
35291            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
35292            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
35293            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
35294            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
35295            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
35296            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
35297            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
35298            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
35299            _ => None,
35300        }
35301    }
35302    fn default_message_from_id(id: u32) -> Option<Self> {
35303        match id {
35304            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35305                ACTUATOR_CONTROL_TARGET_DATA::default(),
35306            )),
35307            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35308                ACTUATOR_OUTPUT_STATUS_DATA::default(),
35309            )),
35310            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
35311            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
35312            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
35313            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
35314            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35315                ATTITUDE_QUATERNION_DATA::default(),
35316            )),
35317            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35318                ATTITUDE_QUATERNION_COV_DATA::default(),
35319            )),
35320            ATTITUDE_TARGET_DATA::ID => {
35321                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
35322            }
35323            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
35324            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
35325            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35326                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35327                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
35328                ))
35329            }
35330            AUTOPILOT_VERSION_DATA::ID => {
35331                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
35332            }
35333            AVAILABLE_MODES_DATA::ID => {
35334                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
35335            }
35336            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35337                AVAILABLE_MODES_MONITOR_DATA::default(),
35338            )),
35339            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
35340            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
35341            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
35342            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35343                CAMERA_CAPTURE_STATUS_DATA::default(),
35344            )),
35345            CAMERA_FOV_STATUS_DATA::ID => {
35346                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
35347            }
35348            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35349                CAMERA_IMAGE_CAPTURED_DATA::default(),
35350            )),
35351            CAMERA_INFORMATION_DATA::ID => {
35352                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
35353            }
35354            CAMERA_SETTINGS_DATA::ID => {
35355                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
35356            }
35357            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35358                CAMERA_THERMAL_RANGE_DATA::default(),
35359            )),
35360            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35361                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
35362            )),
35363            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35364                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
35365            )),
35366            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
35367            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
35368            CAN_FILTER_MODIFY_DATA::ID => {
35369                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
35370            }
35371            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
35372            CELLULAR_CONFIG_DATA::ID => {
35373                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
35374            }
35375            CELLULAR_STATUS_DATA::ID => {
35376                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
35377            }
35378            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35379                CHANGE_OPERATOR_CONTROL_DATA::default(),
35380            )),
35381            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35382                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
35383            )),
35384            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
35385            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
35386            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
35387            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
35388            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
35389            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35390                COMPONENT_INFORMATION_DATA::default(),
35391            )),
35392            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35393                COMPONENT_INFORMATION_BASIC_DATA::default(),
35394            )),
35395            COMPONENT_METADATA_DATA::ID => {
35396                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
35397            }
35398            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35399                CONTROL_SYSTEM_STATE_DATA::default(),
35400            )),
35401            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => Some(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(
35402                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::default(),
35403            )),
35404            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
35405                Some(Self::CUBEPILOT_FIRMWARE_UPDATE_START(
35406                    CUBEPILOT_FIRMWARE_UPDATE_START_DATA::default(),
35407                ))
35408            }
35409            CUBEPILOT_RAW_RC_DATA::ID => {
35410                Some(Self::CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA::default()))
35411            }
35412            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35413                CURRENT_EVENT_SEQUENCE_DATA::default(),
35414            )),
35415            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
35416            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
35417            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35418                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
35419            )),
35420            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
35421            DEBUG_FLOAT_ARRAY_DATA::ID => {
35422                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
35423            }
35424            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
35425            DISTANCE_SENSOR_DATA::ID => {
35426                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
35427            }
35428            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
35429            ENCAPSULATED_DATA_DATA::ID => {
35430                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
35431            }
35432            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
35433            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35434            ESTIMATOR_STATUS_DATA::ID => {
35435                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
35436            }
35437            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35438            EXTENDED_SYS_STATE_DATA::ID => {
35439                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
35440            }
35441            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
35442            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35443                FILE_TRANSFER_PROTOCOL_DATA::default(),
35444            )),
35445            FLIGHT_INFORMATION_DATA::ID => {
35446                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
35447            }
35448            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
35449            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35450            GENERATOR_STATUS_DATA::ID => {
35451                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35452            }
35453            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35454                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35455            )),
35456            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35457                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35458            )),
35459            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35460                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35461            )),
35462            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35463                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35464            )),
35465            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35466                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35467            )),
35468            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35469                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35470                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35471                ))
35472            }
35473            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35474                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35475            )),
35476            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35477                GIMBAL_MANAGER_STATUS_DATA::default(),
35478            )),
35479            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35480                GLOBAL_POSITION_INT_DATA::default(),
35481            )),
35482            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35483                GLOBAL_POSITION_INT_COV_DATA::default(),
35484            )),
35485            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35486                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35487                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35488                ))
35489            }
35490            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35491            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35492            GPS_GLOBAL_ORIGIN_DATA::ID => {
35493                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35494            }
35495            GPS_INJECT_DATA_DATA::ID => {
35496                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35497            }
35498            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35499            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35500            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35501            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35502            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35503            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35504            HERELINK_TELEM_DATA::ID => Some(Self::HERELINK_TELEM(HERELINK_TELEM_DATA::default())),
35505            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
35506                Some(Self::HERELINK_VIDEO_STREAM_INFORMATION(
35507                    HERELINK_VIDEO_STREAM_INFORMATION_DATA::default(),
35508                ))
35509            }
35510            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35511            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35512            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35513            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35514                HIL_ACTUATOR_CONTROLS_DATA::default(),
35515            )),
35516            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35517            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35518            HIL_OPTICAL_FLOW_DATA::ID => {
35519                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35520            }
35521            HIL_RC_INPUTS_RAW_DATA::ID => {
35522                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35523            }
35524            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35525            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35526            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35527                HIL_STATE_QUATERNION_DATA::default(),
35528            )),
35529            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35530            HYGROMETER_SENSOR_DATA::ID => {
35531                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35532            }
35533            ILLUMINATOR_STATUS_DATA::ID => {
35534                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35535            }
35536            ISBD_LINK_STATUS_DATA::ID => {
35537                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35538            }
35539            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35540            LINK_NODE_STATUS_DATA::ID => {
35541                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35542            }
35543            LOCAL_POSITION_NED_DATA::ID => {
35544                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35545            }
35546            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35547                LOCAL_POSITION_NED_COV_DATA::default(),
35548            )),
35549            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35550                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35551                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35552                ))
35553            }
35554            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35555            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35556            LOGGING_DATA_ACKED_DATA::ID => {
35557                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35558            }
35559            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35560            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35561            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35562            LOG_REQUEST_DATA_DATA::ID => {
35563                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35564            }
35565            LOG_REQUEST_END_DATA::ID => {
35566                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35567            }
35568            LOG_REQUEST_LIST_DATA::ID => {
35569                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35570            }
35571            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35572            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35573            MANUAL_SETPOINT_DATA::ID => {
35574                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35575            }
35576            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35577            MESSAGE_INTERVAL_DATA::ID => {
35578                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35579            }
35580            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35581            MISSION_CLEAR_ALL_DATA::ID => {
35582                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35583            }
35584            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35585            MISSION_CURRENT_DATA::ID => {
35586                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35587            }
35588            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35589            MISSION_ITEM_INT_DATA::ID => {
35590                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35591            }
35592            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35593                MISSION_ITEM_REACHED_DATA::default(),
35594            )),
35595            MISSION_REQUEST_DATA::ID => {
35596                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35597            }
35598            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35599                MISSION_REQUEST_INT_DATA::default(),
35600            )),
35601            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35602                MISSION_REQUEST_LIST_DATA::default(),
35603            )),
35604            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35605                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35606            )),
35607            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35608                MISSION_SET_CURRENT_DATA::default(),
35609            )),
35610            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35611                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35612            )),
35613            MOUNT_ORIENTATION_DATA::ID => {
35614                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35615            }
35616            NAMED_VALUE_FLOAT_DATA::ID => {
35617                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35618            }
35619            NAMED_VALUE_INT_DATA::ID => {
35620                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35621            }
35622            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35623                NAV_CONTROLLER_OUTPUT_DATA::default(),
35624            )),
35625            OBSTACLE_DISTANCE_DATA::ID => {
35626                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35627            }
35628            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35629            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35630                ONBOARD_COMPUTER_STATUS_DATA::default(),
35631            )),
35632            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35633                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35634            )),
35635            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35636                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35637            )),
35638            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35639                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35640            )),
35641            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35642                OPEN_DRONE_ID_LOCATION_DATA::default(),
35643            )),
35644            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35645                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35646            )),
35647            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35648                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35649            )),
35650            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35651                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35652            )),
35653            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35654                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35655            )),
35656            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35657                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35658            )),
35659            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35660            OPTICAL_FLOW_RAD_DATA::ID => {
35661                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35662            }
35663            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35664                ORBIT_EXECUTION_STATUS_DATA::default(),
35665            )),
35666            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35667            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35668                PARAM_EXT_REQUEST_LIST_DATA::default(),
35669            )),
35670            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35671                PARAM_EXT_REQUEST_READ_DATA::default(),
35672            )),
35673            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35674            PARAM_EXT_VALUE_DATA::ID => {
35675                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35676            }
35677            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35678            PARAM_REQUEST_LIST_DATA::ID => {
35679                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35680            }
35681            PARAM_REQUEST_READ_DATA::ID => {
35682                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35683            }
35684            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35685            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35686            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35687            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35688            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35689            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35690                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35691            )),
35692            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35693                POSITION_TARGET_LOCAL_NED_DATA::default(),
35694            )),
35695            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35696            PROTOCOL_VERSION_DATA::ID => {
35697                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35698            }
35699            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35700            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
35701            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35702            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35703            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35704            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35705                RC_CHANNELS_OVERRIDE_DATA::default(),
35706            )),
35707            RC_CHANNELS_RAW_DATA::ID => {
35708                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35709            }
35710            RC_CHANNELS_SCALED_DATA::ID => {
35711                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
35712            }
35713            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35714                REQUEST_DATA_STREAM_DATA::default(),
35715            )),
35716            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
35717            RESOURCE_REQUEST_DATA::ID => {
35718                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
35719            }
35720            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35721                RESPONSE_EVENT_ERROR_DATA::default(),
35722            )),
35723            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35724                SAFETY_ALLOWED_AREA_DATA::default(),
35725            )),
35726            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35727                SAFETY_SET_ALLOWED_AREA_DATA::default(),
35728            )),
35729            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35730            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35731            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
35732            SCALED_PRESSURE_DATA::ID => {
35733                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
35734            }
35735            SCALED_PRESSURE2_DATA::ID => {
35736                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35737            }
35738            SCALED_PRESSURE3_DATA::ID => {
35739                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35740            }
35741            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35742            SERVO_OUTPUT_RAW_DATA::ID => {
35743                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35744            }
35745            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35746            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35747                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35748            )),
35749            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35750                SET_ATTITUDE_TARGET_DATA::default(),
35751            )),
35752            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35753                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
35754            )),
35755            SET_HOME_POSITION_DATA::ID => {
35756                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
35757            }
35758            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35759            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35760                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35761            )),
35762            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35763                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
35764            )),
35765            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
35766            SMART_BATTERY_INFO_DATA::ID => {
35767                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35768            }
35769            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
35770            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35771                STORAGE_INFORMATION_DATA::default(),
35772            )),
35773            SUPPORTED_TUNES_DATA::ID => {
35774                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35775            }
35776            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35777            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
35778            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35779            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
35780            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
35781            TERRAIN_REQUEST_DATA::ID => {
35782                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35783            }
35784            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
35785            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35786                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35787            )),
35788            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35789                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35790                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35791                ))
35792            }
35793            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35794                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35795                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35796                ))
35797            }
35798            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
35799            UAVCAN_NODE_INFO_DATA::ID => {
35800                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35801            }
35802            UAVCAN_NODE_STATUS_DATA::ID => {
35803                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35804            }
35805            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35806                UTM_GLOBAL_POSITION_DATA::default(),
35807            )),
35808            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35809            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35810            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35811            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35812                VICON_POSITION_ESTIMATE_DATA::default(),
35813            )),
35814            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35815                VIDEO_STREAM_INFORMATION_DATA::default(),
35816            )),
35817            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35818                VIDEO_STREAM_STATUS_DATA::default(),
35819            )),
35820            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35821                VISION_POSITION_ESTIMATE_DATA::default(),
35822            )),
35823            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35824                VISION_SPEED_ESTIMATE_DATA::default(),
35825            )),
35826            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
35827            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35828            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
35829            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35830            _ => None,
35831        }
35832    }
35833    #[cfg(feature = "arbitrary")]
35834    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35835        match id {
35836            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35837                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35838            )),
35839            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35840                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35841            )),
35842            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35843            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35844            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35845            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35846            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35847                ATTITUDE_QUATERNION_DATA::random(rng),
35848            )),
35849            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35850                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35851            )),
35852            ATTITUDE_TARGET_DATA::ID => {
35853                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35854            }
35855            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35856            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35857            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35858                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35859                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35860                ))
35861            }
35862            AUTOPILOT_VERSION_DATA::ID => {
35863                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35864            }
35865            AVAILABLE_MODES_DATA::ID => {
35866                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35867            }
35868            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35869                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35870            )),
35871            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35872            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35873            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
35874            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35875                CAMERA_CAPTURE_STATUS_DATA::random(rng),
35876            )),
35877            CAMERA_FOV_STATUS_DATA::ID => {
35878                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
35879            }
35880            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35881                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
35882            )),
35883            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
35884                CAMERA_INFORMATION_DATA::random(rng),
35885            )),
35886            CAMERA_SETTINGS_DATA::ID => {
35887                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
35888            }
35889            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35890                CAMERA_THERMAL_RANGE_DATA::random(rng),
35891            )),
35892            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35893                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
35894            )),
35895            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35896                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
35897            )),
35898            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
35899            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
35900            CAN_FILTER_MODIFY_DATA::ID => {
35901                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
35902            }
35903            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
35904            CELLULAR_CONFIG_DATA::ID => {
35905                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
35906            }
35907            CELLULAR_STATUS_DATA::ID => {
35908                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
35909            }
35910            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35911                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
35912            )),
35913            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35914                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
35915            )),
35916            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
35917            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
35918            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
35919            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
35920            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
35921            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35922                COMPONENT_INFORMATION_DATA::random(rng),
35923            )),
35924            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35925                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
35926            )),
35927            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
35928                COMPONENT_METADATA_DATA::random(rng),
35929            )),
35930            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35931                CONTROL_SYSTEM_STATE_DATA::random(rng),
35932            )),
35933            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => Some(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(
35934                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::random(rng),
35935            )),
35936            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
35937                Some(Self::CUBEPILOT_FIRMWARE_UPDATE_START(
35938                    CUBEPILOT_FIRMWARE_UPDATE_START_DATA::random(rng),
35939                ))
35940            }
35941            CUBEPILOT_RAW_RC_DATA::ID => {
35942                Some(Self::CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA::random(rng)))
35943            }
35944            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35945                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
35946            )),
35947            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
35948            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
35949            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35950                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
35951            )),
35952            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
35953            DEBUG_FLOAT_ARRAY_DATA::ID => {
35954                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
35955            }
35956            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
35957            DISTANCE_SENSOR_DATA::ID => {
35958                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
35959            }
35960            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
35961            ENCAPSULATED_DATA_DATA::ID => {
35962                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
35963            }
35964            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
35965            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
35966            ESTIMATOR_STATUS_DATA::ID => {
35967                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
35968            }
35969            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
35970            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
35971                EXTENDED_SYS_STATE_DATA::random(rng),
35972            )),
35973            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
35974            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35975                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
35976            )),
35977            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
35978                FLIGHT_INFORMATION_DATA::random(rng),
35979            )),
35980            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
35981            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
35982            GENERATOR_STATUS_DATA::ID => {
35983                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
35984            }
35985            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35986                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
35987            )),
35988            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35989                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
35990            )),
35991            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35992                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
35993            )),
35994            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35995                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
35996            )),
35997            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35998                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
35999            )),
36000            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36001                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36002                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
36003                ))
36004            }
36005            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36006                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
36007            )),
36008            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36009                GIMBAL_MANAGER_STATUS_DATA::random(rng),
36010            )),
36011            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36012                GLOBAL_POSITION_INT_DATA::random(rng),
36013            )),
36014            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36015                GLOBAL_POSITION_INT_COV_DATA::random(rng),
36016            )),
36017            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36018                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36019                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
36020                ))
36021            }
36022            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
36023            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
36024            GPS_GLOBAL_ORIGIN_DATA::ID => {
36025                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
36026            }
36027            GPS_INJECT_DATA_DATA::ID => {
36028                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
36029            }
36030            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
36031            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
36032            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
36033            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
36034            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
36035            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
36036            HERELINK_TELEM_DATA::ID => Some(Self::HERELINK_TELEM(HERELINK_TELEM_DATA::random(rng))),
36037            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
36038                Some(Self::HERELINK_VIDEO_STREAM_INFORMATION(
36039                    HERELINK_VIDEO_STREAM_INFORMATION_DATA::random(rng),
36040                ))
36041            }
36042            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
36043            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
36044            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
36045            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36046                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
36047            )),
36048            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
36049            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
36050            HIL_OPTICAL_FLOW_DATA::ID => {
36051                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
36052            }
36053            HIL_RC_INPUTS_RAW_DATA::ID => {
36054                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
36055            }
36056            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
36057            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
36058            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36059                HIL_STATE_QUATERNION_DATA::random(rng),
36060            )),
36061            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
36062            HYGROMETER_SENSOR_DATA::ID => {
36063                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
36064            }
36065            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
36066                ILLUMINATOR_STATUS_DATA::random(rng),
36067            )),
36068            ISBD_LINK_STATUS_DATA::ID => {
36069                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
36070            }
36071            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
36072            LINK_NODE_STATUS_DATA::ID => {
36073                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
36074            }
36075            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
36076                LOCAL_POSITION_NED_DATA::random(rng),
36077            )),
36078            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36079                LOCAL_POSITION_NED_COV_DATA::random(rng),
36080            )),
36081            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36082                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36083                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
36084                ))
36085            }
36086            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
36087            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
36088            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
36089                LOGGING_DATA_ACKED_DATA::random(rng),
36090            )),
36091            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
36092            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
36093            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
36094            LOG_REQUEST_DATA_DATA::ID => {
36095                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
36096            }
36097            LOG_REQUEST_END_DATA::ID => {
36098                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
36099            }
36100            LOG_REQUEST_LIST_DATA::ID => {
36101                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
36102            }
36103            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
36104            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
36105            MANUAL_SETPOINT_DATA::ID => {
36106                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
36107            }
36108            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
36109            MESSAGE_INTERVAL_DATA::ID => {
36110                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
36111            }
36112            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
36113            MISSION_CLEAR_ALL_DATA::ID => {
36114                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
36115            }
36116            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
36117            MISSION_CURRENT_DATA::ID => {
36118                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
36119            }
36120            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
36121            MISSION_ITEM_INT_DATA::ID => {
36122                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
36123            }
36124            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36125                MISSION_ITEM_REACHED_DATA::random(rng),
36126            )),
36127            MISSION_REQUEST_DATA::ID => {
36128                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
36129            }
36130            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36131                MISSION_REQUEST_INT_DATA::random(rng),
36132            )),
36133            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36134                MISSION_REQUEST_LIST_DATA::random(rng),
36135            )),
36136            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36137                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
36138            )),
36139            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36140                MISSION_SET_CURRENT_DATA::random(rng),
36141            )),
36142            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36143                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
36144            )),
36145            MOUNT_ORIENTATION_DATA::ID => {
36146                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
36147            }
36148            NAMED_VALUE_FLOAT_DATA::ID => {
36149                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
36150            }
36151            NAMED_VALUE_INT_DATA::ID => {
36152                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
36153            }
36154            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36155                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
36156            )),
36157            OBSTACLE_DISTANCE_DATA::ID => {
36158                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
36159            }
36160            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
36161            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36162                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
36163            )),
36164            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36165                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
36166            )),
36167            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36168                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
36169            )),
36170            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36171                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
36172            )),
36173            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36174                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
36175            )),
36176            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36177                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
36178            )),
36179            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36180                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
36181            )),
36182            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36183                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
36184            )),
36185            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36186                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
36187            )),
36188            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36189                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
36190            )),
36191            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
36192            OPTICAL_FLOW_RAD_DATA::ID => {
36193                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
36194            }
36195            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
36196                ORBIT_EXECUTION_STATUS_DATA::random(rng),
36197            )),
36198            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
36199            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
36200                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
36201            )),
36202            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
36203                PARAM_EXT_REQUEST_READ_DATA::random(rng),
36204            )),
36205            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
36206            PARAM_EXT_VALUE_DATA::ID => {
36207                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
36208            }
36209            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
36210            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
36211                PARAM_REQUEST_LIST_DATA::random(rng),
36212            )),
36213            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
36214                PARAM_REQUEST_READ_DATA::random(rng),
36215            )),
36216            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
36217            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
36218            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
36219            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
36220            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
36221            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
36222                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36223            )),
36224            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36225                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36226            )),
36227            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
36228            PROTOCOL_VERSION_DATA::ID => {
36229                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
36230            }
36231            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
36232            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
36233            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
36234            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
36235            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
36236            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36237                RC_CHANNELS_OVERRIDE_DATA::random(rng),
36238            )),
36239            RC_CHANNELS_RAW_DATA::ID => {
36240                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
36241            }
36242            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
36243                RC_CHANNELS_SCALED_DATA::random(rng),
36244            )),
36245            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36246                REQUEST_DATA_STREAM_DATA::random(rng),
36247            )),
36248            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
36249            RESOURCE_REQUEST_DATA::ID => {
36250                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
36251            }
36252            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36253                RESPONSE_EVENT_ERROR_DATA::random(rng),
36254            )),
36255            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36256                SAFETY_ALLOWED_AREA_DATA::random(rng),
36257            )),
36258            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36259                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
36260            )),
36261            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
36262            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
36263            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
36264            SCALED_PRESSURE_DATA::ID => {
36265                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
36266            }
36267            SCALED_PRESSURE2_DATA::ID => {
36268                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
36269            }
36270            SCALED_PRESSURE3_DATA::ID => {
36271                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
36272            }
36273            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
36274            SERVO_OUTPUT_RAW_DATA::ID => {
36275                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
36276            }
36277            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
36278            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36279                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36280            )),
36281            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36282                SET_ATTITUDE_TARGET_DATA::random(rng),
36283            )),
36284            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36285                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
36286            )),
36287            SET_HOME_POSITION_DATA::ID => {
36288                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
36289            }
36290            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
36291            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36292                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36293            )),
36294            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36295                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36296            )),
36297            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
36298            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
36299                SMART_BATTERY_INFO_DATA::random(rng),
36300            )),
36301            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
36302            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36303                STORAGE_INFORMATION_DATA::random(rng),
36304            )),
36305            SUPPORTED_TUNES_DATA::ID => {
36306                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
36307            }
36308            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
36309            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
36310            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
36311            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
36312            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
36313            TERRAIN_REQUEST_DATA::ID => {
36314                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
36315            }
36316            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
36317            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36318                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
36319            )),
36320            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36321                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36322                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
36323                ))
36324            }
36325            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36326                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36327                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
36328                ))
36329            }
36330            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
36331            UAVCAN_NODE_INFO_DATA::ID => {
36332                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
36333            }
36334            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
36335                UAVCAN_NODE_STATUS_DATA::random(rng),
36336            )),
36337            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36338                UTM_GLOBAL_POSITION_DATA::random(rng),
36339            )),
36340            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
36341            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
36342            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
36343            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36344                VICON_POSITION_ESTIMATE_DATA::random(rng),
36345            )),
36346            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36347                VIDEO_STREAM_INFORMATION_DATA::random(rng),
36348            )),
36349            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36350                VIDEO_STREAM_STATUS_DATA::random(rng),
36351            )),
36352            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36353                VISION_POSITION_ESTIMATE_DATA::random(rng),
36354            )),
36355            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36356                VISION_SPEED_ESTIMATE_DATA::random(rng),
36357            )),
36358            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
36359            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
36360            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
36361            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
36362            _ => None,
36363        }
36364    }
36365    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36366        match self {
36367            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36368            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
36369            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
36370            Self::AIS_VESSEL(body) => body.ser(version, bytes),
36371            Self::ALTITUDE(body) => body.ser(version, bytes),
36372            Self::ATTITUDE(body) => body.ser(version, bytes),
36373            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
36374            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
36375            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
36376            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
36377            Self::AUTH_KEY(body) => body.ser(version, bytes),
36378            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
36379            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
36380            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
36381            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
36382            Self::BATTERY_INFO(body) => body.ser(version, bytes),
36383            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
36384            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
36385            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
36386            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
36387            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
36388            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
36389            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
36390            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
36391            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
36392            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
36393            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
36394            Self::CANFD_FRAME(body) => body.ser(version, bytes),
36395            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
36396            Self::CAN_FRAME(body) => body.ser(version, bytes),
36397            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
36398            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
36399            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
36400            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
36401            Self::COLLISION(body) => body.ser(version, bytes),
36402            Self::COMMAND_ACK(body) => body.ser(version, bytes),
36403            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
36404            Self::COMMAND_INT(body) => body.ser(version, bytes),
36405            Self::COMMAND_LONG(body) => body.ser(version, bytes),
36406            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
36407            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
36408            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
36409            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
36410            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(body) => body.ser(version, bytes),
36411            Self::CUBEPILOT_FIRMWARE_UPDATE_START(body) => body.ser(version, bytes),
36412            Self::CUBEPILOT_RAW_RC(body) => body.ser(version, bytes),
36413            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
36414            Self::CURRENT_MODE(body) => body.ser(version, bytes),
36415            Self::DATA_STREAM(body) => body.ser(version, bytes),
36416            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
36417            Self::DEBUG(body) => body.ser(version, bytes),
36418            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
36419            Self::DEBUG_VECT(body) => body.ser(version, bytes),
36420            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
36421            Self::EFI_STATUS(body) => body.ser(version, bytes),
36422            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
36423            Self::ESC_INFO(body) => body.ser(version, bytes),
36424            Self::ESC_STATUS(body) => body.ser(version, bytes),
36425            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
36426            Self::EVENT(body) => body.ser(version, bytes),
36427            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
36428            Self::FENCE_STATUS(body) => body.ser(version, bytes),
36429            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
36430            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
36431            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
36432            Self::FUEL_STATUS(body) => body.ser(version, bytes),
36433            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
36434            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
36435            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
36436            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
36437            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
36438            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
36439            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
36440            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
36441            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
36442            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
36443            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
36444            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36445            Self::GPS2_RAW(body) => body.ser(version, bytes),
36446            Self::GPS2_RTK(body) => body.ser(version, bytes),
36447            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36448            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
36449            Self::GPS_INPUT(body) => body.ser(version, bytes),
36450            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
36451            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
36452            Self::GPS_RTK(body) => body.ser(version, bytes),
36453            Self::GPS_STATUS(body) => body.ser(version, bytes),
36454            Self::HEARTBEAT(body) => body.ser(version, bytes),
36455            Self::HERELINK_TELEM(body) => body.ser(version, bytes),
36456            Self::HERELINK_VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36457            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
36458            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
36459            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
36460            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
36461            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
36462            Self::HIL_GPS(body) => body.ser(version, bytes),
36463            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
36464            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
36465            Self::HIL_SENSOR(body) => body.ser(version, bytes),
36466            Self::HIL_STATE(body) => body.ser(version, bytes),
36467            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36468            Self::HOME_POSITION(body) => body.ser(version, bytes),
36469            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
36470            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36471            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
36472            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36473            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36474            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36475            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
36476            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36477            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36478            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36479            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
36480            Self::LOG_DATA(body) => body.ser(version, bytes),
36481            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36482            Self::LOG_ERASE(body) => body.ser(version, bytes),
36483            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36484            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36485            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36486            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36487            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36488            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36489            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36490            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36491            Self::MISSION_ACK(body) => body.ser(version, bytes),
36492            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36493            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36494            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36495            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36496            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36497            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36498            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36499            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36500            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36501            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36502            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36503            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36504            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36505            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36506            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36507            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36508            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36509            Self::ODOMETRY(body) => body.ser(version, bytes),
36510            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36511            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36512            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36513            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36514            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36515            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36516            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36517            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36518            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36519            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36520            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36521            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36522            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36523            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36524            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36525            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36526            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36527            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36528            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36529            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36530            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36531            Self::PARAM_SET(body) => body.ser(version, bytes),
36532            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36533            Self::PING(body) => body.ser(version, bytes),
36534            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36535            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36536            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36537            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36538            Self::POWER_STATUS(body) => body.ser(version, bytes),
36539            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36540            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36541            Self::RAW_IMU(body) => body.ser(version, bytes),
36542            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36543            Self::RAW_RPM(body) => body.ser(version, bytes),
36544            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36545            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36546            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36547            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36548            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36549            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36550            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36551            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36552            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36553            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36554            Self::SCALED_IMU(body) => body.ser(version, bytes),
36555            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36556            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36557            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36558            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36559            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36560            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36561            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36562            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36563            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36564            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36565            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36566            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36567            Self::SET_MODE(body) => body.ser(version, bytes),
36568            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36569            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36570            Self::SIM_STATE(body) => body.ser(version, bytes),
36571            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36572            Self::STATUSTEXT(body) => body.ser(version, bytes),
36573            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36574            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36575            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36576            Self::SYS_STATUS(body) => body.ser(version, bytes),
36577            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36578            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36579            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36580            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36581            Self::TIMESYNC(body) => body.ser(version, bytes),
36582            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36583            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36584            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36585            Self::TUNNEL(body) => body.ser(version, bytes),
36586            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36587            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36588            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36589            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36590            Self::VFR_HUD(body) => body.ser(version, bytes),
36591            Self::VIBRATION(body) => body.ser(version, bytes),
36592            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36593            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36594            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36595            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36596            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36597            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36598            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36599            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36600            Self::WIND_COV(body) => body.ser(version, bytes),
36601        }
36602    }
36603    fn extra_crc(id: u32) -> u8 {
36604        match id {
36605            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36606            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36607            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36608            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36609            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36610            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36611            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36612            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36613            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36614            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36615            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36616            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36617                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36618            }
36619            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36620            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36621            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36622            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36623            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36624            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36625            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36626            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36627            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36628            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36629            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36630            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36631            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36632            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36633            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36634            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36635            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36636            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36637            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36638            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36639            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36640            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36641            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36642            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36643            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36644            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36645            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36646            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36647            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36648            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36649            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36650            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => {
36651                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::EXTRA_CRC
36652            }
36653            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
36654                CUBEPILOT_FIRMWARE_UPDATE_START_DATA::EXTRA_CRC
36655            }
36656            CUBEPILOT_RAW_RC_DATA::ID => CUBEPILOT_RAW_RC_DATA::EXTRA_CRC,
36657            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36658            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36659            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36660            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36661            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36662            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36663            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36664            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36665            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36666            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36667            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36668            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36669            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36670            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36671            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36672            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36673            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36674            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36675            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36676            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36677            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36678            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36679            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36680            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36681            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36682            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36683            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36684                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36685            }
36686            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36687            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36688            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36689            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36690            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36691                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36692            }
36693            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36694            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36695            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36696            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36697            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36698            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36699            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36700            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36701            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36702            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36703            HERELINK_TELEM_DATA::ID => HERELINK_TELEM_DATA::EXTRA_CRC,
36704            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
36705                HERELINK_VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC
36706            }
36707            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36708            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36709            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36710            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36711            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36712            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36713            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36714            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36715            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36716            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36717            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36718            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36719            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36720            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36721            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36722            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36723            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36724            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36725            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36726            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36727                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36728            }
36729            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36730            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36731            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36732            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36733            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36734            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36735            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36736            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36737            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36738            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36739            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36740            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36741            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36742            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36743            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36744            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36745            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36746            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36747            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36748            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36749            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36750            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36751            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36752            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36753            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36754            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36755            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36756            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36757            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36758            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36759            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36760            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36761            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36762            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36763            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36764            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36765            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36766            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36767            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36768            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36769            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36770            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36771            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36772            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36773            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36774            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36775            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36776            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36777            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36778            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36779            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36780            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36781            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36782            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36783            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36784            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36785            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36786            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36787            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36788            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36789            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36790            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36791            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36792            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36793            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36794            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36795            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36796            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36797            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36798            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36799            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36800            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36801            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36802            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36803            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36804            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36805            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36806            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36807            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36808            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36809            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36810            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36811            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36812            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36813            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36814            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36815            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36816            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36817            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36818            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36819            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36820            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36821                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36822            }
36823            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36824            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36825            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36826            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36827            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36828            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36829            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36830            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36831            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36832            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36833            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36834            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36835            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36836            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36837            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36838                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36839            }
36840            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36841                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36842            }
36843            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36844            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36845            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36846            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36847            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36848            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36849            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36850            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36851            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36852            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36853            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36854            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36855            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36856            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36857            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36858            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36859            _ => 0,
36860        }
36861    }
36862    fn target_system_id(&self) -> Option<u8> {
36863        match self {
36864            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36865            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36866            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36867            Self::CAN_FRAME(inner) => Some(inner.target_system),
36868            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36869            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36870            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36871            Self::COMMAND_INT(inner) => Some(inner.target_system),
36872            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36873            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(inner) => Some(inner.target_system),
36874            Self::CUBEPILOT_FIRMWARE_UPDATE_START(inner) => Some(inner.target_system),
36875            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36876            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36877            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36878            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36879            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36880            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36881            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36882            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36883            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36884            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36885            Self::LOG_ERASE(inner) => Some(inner.target_system),
36886            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36887            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36888            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36889            Self::MISSION_ACK(inner) => Some(inner.target_system),
36890            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36891            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36892            Self::MISSION_ITEM(inner) => Some(inner.target_system),
36893            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
36894            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
36895            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
36896            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
36897            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
36898            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
36899            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
36900            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
36901            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
36902            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
36903            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
36904            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
36905            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
36906            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
36907            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
36908            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
36909            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
36910            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
36911            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
36912            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
36913            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
36914            Self::PARAM_SET(inner) => Some(inner.target_system),
36915            Self::PING(inner) => Some(inner.target_system),
36916            Self::PLAY_TUNE(inner) => Some(inner.target_system),
36917            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
36918            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
36919            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
36920            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
36921            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
36922            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
36923            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
36924            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
36925            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
36926            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
36927            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
36928            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
36929            Self::SET_MODE(inner) => Some(inner.target_system),
36930            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
36931            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
36932            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
36933            Self::TIMESYNC(inner) => Some(inner.target_system),
36934            Self::TUNNEL(inner) => Some(inner.target_system),
36935            Self::V2_EXTENSION(inner) => Some(inner.target_system),
36936            _ => None,
36937        }
36938    }
36939    fn target_component_id(&self) -> Option<u8> {
36940        match self {
36941            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
36942            Self::CANFD_FRAME(inner) => Some(inner.target_component),
36943            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
36944            Self::CAN_FRAME(inner) => Some(inner.target_component),
36945            Self::COMMAND_ACK(inner) => Some(inner.target_component),
36946            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
36947            Self::COMMAND_INT(inner) => Some(inner.target_component),
36948            Self::COMMAND_LONG(inner) => Some(inner.target_component),
36949            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(inner) => Some(inner.target_component),
36950            Self::CUBEPILOT_FIRMWARE_UPDATE_START(inner) => Some(inner.target_component),
36951            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
36952            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
36953            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
36954            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
36955            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
36956            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
36957            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
36958            Self::LOGGING_ACK(inner) => Some(inner.target_component),
36959            Self::LOGGING_DATA(inner) => Some(inner.target_component),
36960            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
36961            Self::LOG_ERASE(inner) => Some(inner.target_component),
36962            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
36963            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
36964            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
36965            Self::MISSION_ACK(inner) => Some(inner.target_component),
36966            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
36967            Self::MISSION_COUNT(inner) => Some(inner.target_component),
36968            Self::MISSION_ITEM(inner) => Some(inner.target_component),
36969            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
36970            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
36971            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
36972            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
36973            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
36974            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
36975            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
36976            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
36977            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
36978            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
36979            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
36980            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
36981            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
36982            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
36983            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
36984            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
36985            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
36986            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
36987            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
36988            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
36989            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
36990            Self::PARAM_SET(inner) => Some(inner.target_component),
36991            Self::PING(inner) => Some(inner.target_component),
36992            Self::PLAY_TUNE(inner) => Some(inner.target_component),
36993            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
36994            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
36995            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
36996            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
36997            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
36998            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
36999            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
37000            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
37001            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
37002            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
37003            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
37004            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
37005            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
37006            Self::TIMESYNC(inner) => Some(inner.target_component),
37007            Self::TUNNEL(inner) => Some(inner.target_component),
37008            Self::V2_EXTENSION(inner) => Some(inner.target_component),
37009            _ => None,
37010        }
37011    }
37012}